1.1.0 • Published 7 years ago

gulp-ngn-js v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Requirements

  • PHP 5.6 CLI installed
  • Download Ngn components
mkdir ngn-env
cd ngn-env
git clone https://github.com/majexa/ngn.git
git clone https://github.com/majexa/ngn-cs.git
git clone https://github.com/majexa/run.git
git clone https://github.com/mootools/mootools-core
git clone https://github.com/mootools/mootools-more

Usage

Contents of index.html

<script>
new Ngn.SomeClass();
</script>

Next gulp task will parse <script> tags in index.html and build all founded NgnJS classes with it dependencies.

var gulp = require('gulp');
var ngnJs = require('gulp-ngn-js');

gulp.task('build', function () {
  var opt = {
    ngnEnvFolder: process.env.NGN_ENV_FOLDER,
    buildFolder: process.env.PROJECT_FOLDER + '/build/public/m',
    projectFolder: process.env.PROJECT_FOLDER,
    name: 'main',
    jsonFieldsFolder: process.env.PROJECT_FOLDER + '/models'
  };
  var reportOptions = {
    err: true,
    stderr: true,
    stdout: true
  };
  gulp.src('index.html', {read: false})
    .pipe(ngnJs(opt))
    .pipe(ngnJs.reporter(reportOptions))
});
1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago