1.0.3 • Published 12 months ago

@naghashyan/ngs-builder v1.0.3

Weekly downloads
15
License
MIT
Repository
github
Last release
12 months ago

NGS cli

NPM Version

Installation

npm install -g @naghashyan/ngs-builder

command list

watch project

ngs watch

build project

ngs web-build

default ngs.config.json example

{
  "version": "1.0.0",
  "build": {
    "source": "src",
    "appDir": "src/app",
    "output": "htdocs",
    "entry": "src/main.js",
    "watch": true,
    "ignore": [
      "src/styles/mixin"
    ],
    "browserSync": {
      "isEnable": false,
      "rootDir": "src",
      "reload": true,
      "port": 3000,
      "uiPort": 3000,
      "isOpenNewTab": false
    }
  }
}

update symlink

ngs jsupdate -m `module_name`

build js

ngs build -t `type` -m `module_name` -v `build app version`

type=js, less, sass

JS builder.json file example

{
  "version": "1.0.0",  
  "source_dir": "",
  "es5": true,
  "out_dir": "out/js",
  "es5_out_dir": "htdocs/out/js/es5",
  "compress": true,
  "builders": [
    {
      "include": "ngs-cms"
    }
    {
      "out_dir": "ngs",
      "module": "ngs",
      "files": [
        "NGS.js",
        "Dispatcher.class.js",
        "AbstractRequest.class.js",
        "AbstractLoad.class.js",
        "AbstractAction.class.js",
        "AjaxLoader.class.js",
        "CustomEvent.js",
        "NGSEvent.js"
      ]
    }
  ]
}

convert old NGS load and action to es6 js classes

ngs convert -t `type` -m `module_name` -d `loads_actions_directory`

convert.config.json should be placed in the root of NGS project

convert.config.json example

[
  {
    "path": "managers/PagingManager",
    "old_name": "NGS.PagingManager",
    "name": "PagingManager"
  },
  {
    "path": "util/DialogUtility",
    "old_name": "NGS.DialogUtility",
    "name": "DialogUtility"
  }
]

build minify js files

ngs minify -i web/js/util/builder.json`

builder.config.json example

{
  "es5": true,
  "source_dir": "web/js/util/out",
  "out_file": "web/js/ngs/ngs.min.js",
  "es5_out_file": "web/js/ngs/es5-ngs.min.js",
  "compress": true,
  "files": [
    "NGS.js",
    "Events.js"
  ]
}
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago

1.0.3

12 months ago

0.8.5

2 years ago

0.8.6

2 years ago

0.8.4

3 years ago

0.8.3

3 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago