Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Babel dependency and configuration for building from ES6 codebase #31

Merged
merged 4 commits into from Sep 11, 2015
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
@@ -0,0 +1,3 @@
{
"stage": 0
}
2 changes: 1 addition & 1 deletion bin/gatsby-build.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
require('babel/register');

require('coffee-script/register');
require('./build');

1 change: 1 addition & 0 deletions bin/gatsby-serve.js
@@ -1,4 +1,5 @@
#!/usr/bin/env node
require('babel/register');

require('coffee-script/register');
require('./serve');
1 change: 0 additions & 1 deletion lib/loaders/config-loader/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/utils/glob-pages.coffee
Expand Up @@ -17,7 +17,7 @@ module.exports = (directory, callback) ->

# Make this easy to add to through the config?
# Or just keep adding extensions...?
glob directory + '/pages/**/?(*.coffee|*.cjsx|*.jsx|*.md|*.html)', null, (err, pages) =>
glob directory + '/pages/**/?(*.coffee|*.cjsx|*.jsx|*.js|*.md|*.html)', null, (err, pages) =>
if err then return callback(err)

for page in pages
Expand Down Expand Up @@ -83,4 +83,3 @@ module.exports = (directory, callback) ->
pagesData.push pageData

callback(null, pagesData)

3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -73,5 +73,8 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be a regular dependency at least for how I think about things. Gatsby only has a dev mode so what would normally be a dev dependency (like Babel) is just a regular dependency in Gatsby :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, just used to --save-dev babel :)

"babel": "^5.8.23"
}
}