Skip to content

Commit

Permalink
Merge 39a2c7e into 13125c3
Browse files Browse the repository at this point in the history
  • Loading branch information
trustmaster committed Jul 24, 2020
2 parents 13125c3 + 39a2c7e commit de24363
Show file tree
Hide file tree
Showing 91 changed files with 15,654 additions and 14,712 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
bin/*.js
/lib/
/_site/
spec/*.js
spec/browser/*.js
spec/result.xml
spec/runner.html
server/static/js/*.js
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ NoFlo ChangeLog

## 1.2.0 (git master)

* Ported NoFlo from CoffeeScript to ES6
* Deprecated constructing networks with `new noflo.Network`. Use `noflo.createNetwork` instead, with the following options available:
- `subscribeGraph: true`: Uses `LegacyNetwork` which modifies network topology based on changes in graph. This can cause some types of errors to be silent.
- `subscribeGraph: false`: Uses `Network`: network topology can be changed with network's methods (`addNode`, `removeEdge`, etc) and will be also written to the graph.
For backwards compatibility reasons, `subscribeGraph` defaults to `true`. Adapt your applications to use `false` instead and start utilizing Network methods for any changes to a running graph.
* Added support for a more standard `noflo.createNetwork(graph, options, callback)` signature, with backwards compatibility for the legacy `noflo.createNetwork(graph, callback, options)` signature
* Removed support for `noflo.WirePattern`. WirePattern has been deprecated since 1.0, and all code using it should be migrated to the latest Process API
* Removed support for changing component icon and description statically (on class level) at run-time (i.e. `ComponentName::icon = 'new-icon'`). Component icon and description should be set in class constructor or in `getComponent` instead. Changing icon and description for a specific instance (process) is not affected and is fully supported

## 1.1.3 (April 12th 2018)

Expand Down
150 changes: 0 additions & 150 deletions Gruntfile.coffee

This file was deleted.

138 changes: 138 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
module.exports = function() {
// Project configuration
this.initConfig({
pkg: this.file.readJSON('package.json'),

// Copy plain JS files
babel: {
options: {
presets: ['env']
},
dist: {
files: [{
cwd: 'src/lib/',
src: ['**/*.js'],
dest: 'lib/',
expand: true,
ext: '.js'
}
, {
cwd: 'src/components/',
src: ['**/*.js'],
dest: 'components/',
expand: true,
ext: '.js'
}
]
}
},

// Browser build of NoFlo
noflo_browser: {
options: {
baseDir: './',
webpack: {
module: {
rules: [{
test: /\.js$/,
use: [{
loader: 'babel-loader',
options: {
presets: ['env']
}
}
]
}
]
}
}
},
build: {
files: {
'browser/noflo.js': ['spec/fixtures/entry.js']
}
}
},

// BDD tests on Node.js
mochaTest: {
nodejs: {
src: ['spec/*.js'],
options: {
reporter: 'spec',
grep: process.env.TESTS
}
}
},

// Web server for the browser tests
connect: {
server: {
options: {
port: 8000
}
}
},

// Generate runner.html
noflo_browser_mocha: {
all: {
options: {
scripts: [
"../browser/<%=pkg.name%>.js",
"https://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.7.1/coffee-script.min.js"
]
},
files: {
'spec/runner.html': ['spec/*.js']
}
}
},
// BDD tests on browser
mocha_phantomjs: {
all: {
options: {
output: 'spec/result.xml',
reporter: 'spec',
urls: ['http://localhost:8000/spec/runner.html'],
failWithOutput: true
}
}
}
});

// Grunt plugins used for building
this.loadNpmTasks('grunt-babel');
this.loadNpmTasks('grunt-noflo-browser');

// Grunt plugins used for testing
this.loadNpmTasks('grunt-contrib-connect');
this.loadNpmTasks('grunt-mocha-test');
this.loadNpmTasks('grunt-mocha-phantomjs');

// Our local tasks
this.registerTask('build', 'Build NoFlo for the chosen target platform', target => {
if (target == null) { target = 'all'; }
this.task.run('babel');
if ((target === 'all') || (target === 'browser')) {
this.task.run('noflo_browser');
}
});

this.registerTask('test', 'Build NoFlo and run automated tests', target => {
if (target == null) { target = 'all'; }
this.task.run(`build:${target}`);
if ((target === 'all') || (target === 'nodejs')) {
// The components directory has to exist for Node.js 4.x
this.file.mkdir('components');
this.task.run('mochaTest');
}
if ((target === 'all') || (target === 'browser')) {
this.task.run('noflo_browser_mocha');
this.task.run('connect');
// this.task.run('mocha_phantomjs');
}
});

this.registerTask('default', ['test']);
};
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"chai": "^4.0.0",
"coveralls": "^3.0.0",
"eslint": "^7.2.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.21.2",
"grunt": "^1.0.1",
"grunt-babel": "^7.0.0",
"grunt-cli": "~1.2.0",
"grunt-coffeelint": "^0.0.16",
"grunt-contrib-coffee": "^2.0.0",
Expand Down Expand Up @@ -59,7 +64,7 @@
},
"nyc": {
"include": [
"src/**/*.coffee"
"src/**/*.js"
]
}
}
}
20 changes: 20 additions & 0 deletions spec/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "airbnb-base",
"rules": {
"consistent-return": 0,
"default-case": 0,
"func-names": 0,
"global-require": 0,
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": 0,
"no-console": 0,
"no-param-reassign": 0,
"no-plusplus": 0,
"no-restricted-syntax": 0,
"no-return-assign": 0,
"no-shadow": 0,
"no-undef": 0,
"no-unused-expressions": 0,
"prefer-destructuring": 0
}
}
Loading

0 comments on commit de24363

Please sign in to comment.