Friday, 20 July 2018

How to create dist



The scope of this document is to introduce steps to create dist for the very first time.

Steps:

1) Open git bash where package.json is placed in src\app\xxx where xxx can be any folder under src\app

2) Type command: bower install - this will create the bower_components folder

To resolve bower command not found- npm install -g bower
If the above-mentioned command does not work then set permission for the main folder to everyone (new user create) --For IIS
Rerun bower install

3) Type command: npm install - this will create the node_modules folder

4) Type command: gulp --production - this will create dist folder

Issues while using above gulp command

a) command gulp not found

To resolve type command: npm install --global gulp-cli

b) require.extensions.hasownproperty is not a function require-dir

To resolve this issue open node_modules\require-dir\index.js

if (!require.extensions.hasOwnProperty(ext)) {

replace above line with the following one in index.js

if (!Object.prototype.hasOwnProperty.call(require.extensions, ext)) {

Now try

gulp --production

No comments:

Post a Comment