gulp build Builds and packages your library under the dist/ folder.
gulp build:watch Watches the source files (*.ts, *.html and *.scss) and re-builds your library upon changes (useful for live refresh of demo app during development).
gulp build:watch-fast Watches the source files (*.ts, *.html and *.scss) and re-builds your library upon changes (without running tests).
gulp test Launches the tests (*.spec.ts) you wrote in src/ and run code coverage on them. The coverage report can be found in coverage/ folder
gulp test:watch Launches tests in watch mode. Every changes in *.spec.ts
gulp test:watch-no-cc Same as gulp test:watch but files do not get instrumented for code coverage (useful for debugging)
gulp test:demo Launches demo application tests(same as running ng test from demo/).
gulp build:demo Builds demo application for production.
gulp build:demo-ssr Builds demo application for universal (server side rendering) testing.
gulp serve:demo Serves demo application (same as running ng serve from demo/).
gulp serve:demo-ssr Serves demo application for universal (server side rendering) testing.
gulp serve:doc2 Serves the generated compodoc documentation (from dist/doc folder) at https://localhost:8080.
Start guide
npm adduser
src// 안에 모든 파일 이름 lib 이름으로 변경
- gulpfile.js
const config = { libraryName: '라이브러리 이름으로', unscopedLibraryName: '라이브러리 이름으로', allSrc: 'src//*', allTs: 'src//!(.spec).ts', allSass: 'src/**/.(scss|sass)', allHtml: 'src/**/*.html', demoDir: 'demo/', buildDir: 'tmp/', outputDir: 'dist/', coverageDir: 'coverage/' };
- package.json
name: '라이브러리 이름으로' "filename": "./src/라이브러리 이름으로.js",
- tsconfig.lib.es5.json, tsconfig.lib.json
"flatModuleOutFile": "라이브러리 이름으로.js", "flatModuleId": "라이브러리 이름으로",
--version={'major', 'minor' or 'patch'}
gulp release --version=patch