diff --git a/README.md b/README.md index 6ffbaf5..9c7ebc6 100644 --- a/README.md +++ b/README.md @@ -103,3 +103,14 @@ new LoggerFactory(0, { } }) ``` + +# 5. Building yourself: + - `yarn install` - installs devDependencies. I use `yarn.lock` but npm work as well. + - `yarn build` - compiles code to `./lib` directory. This build has: + - Type definitions in `index.d.ts` + - Umd version for import via script tag `browser.js` + - CommonJS version for if you use bundler like webpack `index.js`. + - `yarn test` - runs mocha tests from `./test/index.ts. + - `yarn lint:check` - lints the src directory. Ignore the `test` dir. + - `yarn lint:fix` - automatically fixes wrong formatting in `src`. + - `yarn publish` - updates npm version diff --git a/package.json b/package.json index aa0b376..1dda057 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,16 @@ { "name": "lines-logger", - "version": "1.3.0", + "version": "1.3.1", "main": "lib/index.js", "description": "A simple browser logger that keeps origin source files location", "scripts": { - "build": "", + "build": "rm -rf ./lib && tsc -p src/tsconfig.json && rollup -c ./rollup.config.js && uglifyjs lib/index.js -o lib/index.js --compress", "test": "mocha", "report": "nyc mocha", "lcov": "nyc report --reporter=text-lcov > coverage.lcov", "codecov": "codecov", - "check": "gts check", - "clean": "gts clean", - "compile": "rm ./lib -rf && tsc -p src/tsconfig.json && rollup -c ./rollup.config.js && uglifyjs lib/index.js -o lib/index.js --compress", - "fix": "gts fix", + "lint:check": "gts check", + "lint:fix": "gts fix", "posttest": "npm run check" }, "repository": {