Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Latest commit

 

History

History
78 lines (59 loc) · 1.7 KB

README.md

File metadata and controls

78 lines (59 loc) · 1.7 KB

gulp-nstools NPM version

NetSuite Bundle automatization for Continuous Integration

Required

  • node.js 4+

Install Dependency Status devDependency Status

    npm install gulp-nstools --save-dev

Default Project

+-- gulpfile.js
+-- module1
|   +-- bundle.json
|   +-- src
|   |   +-- SC-module1-main.js
bundle.json
{
  "name": "module1",
  "scripts": [
    "SC-module1-main"
 ]
}

Package

var Q = require('q'),
    gulp = require('gulp'),
    gulpLoadPlugins = require('gulp-load-plugins'),
    plugins = gulpLoadPlugins();
    
gulp.task('pacakge:generate', function() {
    let deferred = Q.defer();

    let nstools = plugins.nstools;
    
    // generate Netsuite package
    gulp.src(__dirname+ '/*/bundle.json')
        .pipe(nstools.package())
        .pipe(plugins.uglify({
            compress: {
                drop_console: true
            }
        }))
        .pipe(gulp.dest(__dirname + '/.dist'))
        .on('end', () => {
            deferred.resolve();
        });

    return deferred.promise;
});

Install

... todo - manager modules dependencies using npm.

deploy

... todo - deploys packages into NetSuite ... and configure SuiteScripts