0.5.5 • Published 4 years ago

frontend-util v0.5.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

frontend-util

utility code for frontend

Directory structure

/dist
/misc
/src
package.json
tsconfig.json
webpack.config.js

When you write code with typescript...

background: The combination of Webpack and ts-loader is good for making bundled js file from ts files, but it's not support bundle d.ts files. so We need to make it manually.

Let's think separate js and ts. 1. Write code in typescript 2. Typescript compiler (tsc) creates d.ts files on misc/ 3. Webpack copy misc/ to dist/ 4. Webpack creates javascript build output on dist/main.js

See npm run build script on package.json. then you can see tsc runs first and webpack next.

"tsc && npm run webpack"

Running tests from command line

npm install
npm run test

Distribution

npm install
npm run build

Finally, commit output files in dist folder.

*Make sure to test new features in a seprate branch and do not merge it to master before releasing service-dependent code to its master branch.