3.6.1 • Published 5 years ago

gulp-angular2-project-registry v3.6.1

Weekly downloads
5
License
MIT
Repository
gitlab
Last release
5 years ago

dependencies dev-dependencies

NPM

Gulp Angular2 Project Registry

This registry supplies all necessary tasks to build, test and lint angular 6 web application. Supports generating both development and production bundles to be created.

How to start

npm install gulp gulp-angular2-project-registry

Then create a gulpfile.js in the project root and put the following content there:

const gulp = require('gulp');
const CustomRegistry = require('gulp-angular2-project-registry');

gulp.registry(new CustomRegistry());

Run npx gulp provision and registry task will create a default directory structure for the application.

Run npx gulp dev for running a development environment. See task list below to see what else is available in the registry.

Configuration

All configuration is relative to the project root unless otherwise mentioned.

port

Type: number

Default: 8080

Port for dev and bundle tasks server.

indexFile

Type: string

Default: 'index.pug'

SPA entry point file, processed by pug.

sourcesDir

Type: string

Default: 'app'

Directory that contains application sources, as well as mainModule and productionModule files.

mainModule

Type: string

Default: 'main'

Bootstrap file for Angular SPA in development mode. Path is relative to sourcesDir.

productionModule

Type: string

Default: 'main-aot'

Bootstrap file for Angular SPA in production mode. Path is relative to sourcesDir.

testsDir

Type: string

Default: 'tests'

cssDir

Type: string

Default: 'styles'

Path that contains styles processed by stylus that will be included in indexFile.

staticsDir

Type: string

Default: 'statics'

Path to the folder that contains all static resources that will be copied over to the buildDir.

vendors

Type: string[]

Default: []

Array of javascript files optionally to be included into vendors bundle. Useful if you have third-party libraries that you rely on in your project.

map

Type: object

Default: {}

Specify additional map for SystemJS configuration in case you want to load third-party modules.

buildDir

Type: string

Default: 'build'

tsconfigPath

Type: string

Default: 'tsconfig.json'

appBundlePath

Type: string

Default: 'bundle/app.min.js'

Path is relative to buildDir.

cssBundlePath

Type: string

Default: 'bundle/bundle.min.css'

Path is relative to buildDir.

vendorBundlePath

Type: string

Default: 'bundle/vendor.min.js'

Path is relative to buildDir.

addRootSlash

Type: string

Default: false

Whether to add the root slash to all injected resources (css and js). Useful if you run your application not from '/'.

Tasks

TaskDescription
cleanCleans build directory
app:cleanCleans only application part from build directory.
styles:cleanCleans only styles (angular component styles) part from build directory.
css:cleanCleans only css (page styles) part from build directory.
pages:cleanCleans created html file from build directory.
templates:cleanCleans only angular templates part from build directory.
statics:cleanCleans only static files from build directory.
test:cleanCleans only test files from build directory.
connectStarts web server in build directory.
appCompiles app files.
stylesCompiles angular component styles files.
templatesCompiles angular templates files.
cssCompiles page styles.
pagesCompiles main page injecting all js and css.
app:bundleCreates app bundle containing all dependencies, styles and templates.
css:bundleCompiles all css into a single bundle.
pages:bundleCompiles production page with inlining marked assets.
compile:bundleCompiles everything to a production bundle.
vendorCreates vendors bundle.
staticsCopies all statics to build directory.
compileCompiles everything except tests.
testCompiles and runs tests.
test:watchWatches for test changes.
tslint:appLints application.
tslint:testLints tests.
tslintLints everything.
devRuns clean, compile, connect and watch.
bundleRuns clean, compile:bundle and connect.
provisionCopies default structure to the current directory (without overwrite).
3.6.1

5 years ago

3.6.0

5 years ago

3.5.5

5 years ago

3.5.4

5 years ago

3.5.3

5 years ago

3.5.2

5 years ago

3.5.1

5 years ago

3.5.0

5 years ago

3.4.2

5 years ago

3.4.1

5 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.1.0

5 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago