Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: node_js
node_js:
- '4.6'
before_script:
- npm install -g grunt-cli
deploy:
provider: npm
email: henri.bergius@iki.fi
api_key:
secure: F3Ge2V1aKSTU+ZhIF5aAvRzFn0Q40YDqr3YdFG0NxUs9C+xUvLVLlbGBarmY3brnyinLiOyJZtmPQDG4DHZScKv/Cairo7qmUrRIu48ml9KJVdvy/cU/nbGLO7ZMAV6pEW2CFtVacf6MQ4ArBI4hXV4AtsRm6NwUcHXwQxgoCDQ=
on:
tags: true
repo: noflo/noflo-cad
55 changes: 9 additions & 46 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,10 @@ module.exports = ->
ext: '.js'

# Browser version building
component:
install:
options:
action: 'install'
component_build:
'noflo-cad':
output: './browser/'
config: './component.json'
scripts: true
styles: false
plugins: ['coffee']
configure: (builder) ->
# Enable Component plugins
json = require 'component-json'
builder.use json()

# Fix broken Component aliases, as mentioned in
# https://github.com/anthonyshort/component-coffee/issues/3
combine:
browser:
input: 'browser/noflo-cad.js'
output: 'browser/noflo-cad.js'
tokens: [
token: '.coffee'
string: '.js'
]
noflo_browser:
build:
files:
'browser/noflo-cad.js': ['component.json']

# JavaScript minification for the browser
uglify:
Expand All @@ -55,18 +33,12 @@ module.exports = ->
files: ['spec/*.coffee', 'components/*.coffee']
tasks: ['test']

# BDD tests on Node.js
cafemocha:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'dot'

# BDD tests on browser
mocha_phantomjs:
options:
output: 'spec/result.xml'
reporter: 'dot'
reporter: 'spec'
failWithOutput: true
all: ['spec/runner.html']

# Coding standards
Expand All @@ -75,35 +47,26 @@ module.exports = ->

# Grunt plugins used for building
@loadNpmTasks 'grunt-contrib-coffee'
@loadNpmTasks 'grunt-component'
@loadNpmTasks 'grunt-component-build'
@loadNpmTasks 'grunt-combine'
@loadNpmTasks 'grunt-noflo-browser'
@loadNpmTasks 'grunt-contrib-uglify'

# Grunt plugins used for testing
@loadNpmTasks 'grunt-contrib-watch'
@loadNpmTasks 'grunt-cafe-mocha'
@loadNpmTasks 'grunt-mocha-phantomjs'
@loadNpmTasks 'grunt-coffeelint'

# Our local tasks
@registerTask 'build', 'Build NoFlo for the chosen target platform', (target = 'all') =>
@task.run 'coffee'
if target is 'all' or target is 'browser'
@task.run 'component'
@task.run 'component_build'
@task.run 'combine'
@task.run 'noflo_browser'
@task.run 'uglify'

@registerTask 'test', 'Build NoFlo and run automated tests', (target = 'all') =>
@task.run 'coffeelint'
@task.run 'coffee'
if target is 'all' or target is 'nodejs'
@task.run 'cafemocha'
if target is 'all' or target is 'browser'
@task.run 'component'
@task.run 'component_build'
@task.run 'combine'
@task.run 'noflo_browser'
@task.run 'mocha_phantomjs'

@registerTask 'default', ['test']
30 changes: 19 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@
"description": "NoFlo components for CAD",
"version": "0.0.1",
"author": "Jon Nordby <jononor@gmail.com>",
"license": "MIT",
"keywords": [
"noflo"
],
"repository": {
"type": "git",
"url": "git://github.com/jonnor/noflo-cad.git"
"url": "git://github.com/noflo/noflo-cad.git"
},
"dependencies": {
"noflo": "~0.4.4",
"noflo": "0.x >= 0.5",
"openJSCADorg": "~0.0.1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonnor this one is not published on NPM

},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-coffee": "~0.6.6",
"coffee-loader": "^0.7.2",
"coffee-script": "^1.12.2",
"fbp-loader": "^0.1.1",
"grunt": "~1.0.1",
"grunt-coffeelint": "~0.0.6",
"grunt-component-build": "~0.2.7",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.3.1",
"grunt-combine": "~0.8.3",
"grunt-component": "~0.1.2",
"component-json": "~0.1.4",
"noflo-core": "~0.1.2"
"grunt-contrib-coffee": "~1.0.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-contrib-watch": "~1.0.0",
"grunt-noflo-browser": "^1.1.4",
"json-loader": "^0.5.4",
"noflo-core": "~0.2.3"
},
"noflo": {
"icon": "comments",
Expand All @@ -39,5 +44,8 @@
"ToSTL": "components/ToSTL.coffee",
"ToOutlinePaths": "components/ToOutlinePaths.coffee"
}
},
"scripts": {
"test": "grunt test"
}
}