Last active
August 29, 2015 14:26
-
-
Save agmcleod/6c4bb6f6572fcc28c7ea to your computer and use it in GitHub Desktop.
React/JSX/ES6 setup.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ecmaFeatures": { | |
"arrowFunctions": true, | |
"blockBindings": false, | |
"classes": true, | |
"forOf": true, | |
"jsx": true, | |
"modules": true, | |
"objectLiteralShorthandMethods": true | |
}, | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"plugins": [ | |
"react" | |
], | |
"rules": { | |
"react/jsx-uses-vars": 1, | |
"no-underscore-dangle": 0 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-eslint'); | |
grunt.loadNpmTasks('grunt-browserify'); | |
grunt.initConfig({ | |
browserify: { | |
dist: { | |
files: { | |
'bundle.js': ['src/app.js'] | |
}, | |
options: { | |
transform: [['babelify', { optional: ['runtime'] }]], | |
browserifyOptions: { | |
debug: true | |
} | |
} | |
} | |
}, | |
eslint : { | |
target: ["src/**/*.js"] | |
}, | |
watch: { | |
scripts: { | |
files: ['src/**/*.js'], | |
tasks: ['eslint', 'browserify'], | |
options: { | |
atBegin: true, | |
spawn: true | |
} | |
} | |
} | |
}); | |
grunt.registerTask("default", ["watch"]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "project", | |
"version": "1.0.0", | |
"description": "Put in description here", | |
"author": "<Your name>", | |
"devDependencies": { | |
"babel": "^5.8.12", | |
"babel-runtime": "^5.8.12", | |
"babelify": "^6.1.3", | |
"eslint": "^0.24.1", | |
"expect.js": "^0.3.1", | |
"grunt": "^0.4.5", | |
"grunt-browserify": "^3.8.0", | |
"grunt-contrib-watch": "^0.6.1", | |
"grunt-eslint": "^16.0.0", | |
"mocha": "^2.2.5" | |
}, | |
"dependencies": { | |
"eslint-plugin-react": "^2.7.1", | |
"react": "^0.13.3", | |
"reflux": "^0.2.10" | |
}, | |
"scripts": { | |
"specs": "mocha --ui tdd --compilers js:babel/register spec/**/*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment