Skip to content

Commit

Permalink
feat(build): stop transpiling for nodejs
Browse files Browse the repository at this point in the history
BREAKING: main needs to point to src/index.js now, as no lib is generated anymore
  • Loading branch information
dignifiedquire committed Oct 23, 2016
1 parent 5273a9b commit 0f7d392
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 44 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ Your `package.json` should have the following entries.


```json
"main": "lib/index.js",
"jsnext:main": "src/index.js",
"main": "src/index.js",
"scripts": {
"lint": "aegir-lint",
"release": "aegir-release",
Expand All @@ -35,8 +34,6 @@ Your `package.json` should have the following entries.
}
```

You should also add `babel-runtime` to your `dependencies` as it is required by the babelified version in `lib`.

## Stack Requirements

To bring you its many benefits, `aegir` requires
Expand Down Expand Up @@ -111,8 +108,6 @@ https://unpkg.com/<module-name>/dist/index.js
https://unpkg.com/<module-name>/dist/index.min.js
```
There is also an ES5 build that will be placed in `lib` that will be required by default from consumers using `require`.
You can run it using
```bash
Expand Down
2 changes: 1 addition & 1 deletion tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module.exports = (gulp) => {
require('./build/browser')(gulp)
require('./clean')(gulp)

gulp.task('build', ['build:browser', 'build:node'])
gulp.task('build', ['build:browser'])
}
28 changes: 2 additions & 26 deletions tasks/build/node.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
'use strict'

const size = require('gulp-size')

module.exports = (gulp) => {
gulp.task('copy::node', () => {
return gulp.src('src/**/*')
.pipe(size())
.pipe(gulp.dest('lib'))
})

gulp.task('build::node', () => {
const babel = require('gulp-babel')
const config = require('../../config/babel')

return gulp.src('lib/**/*.js')
.pipe(babel(config))
.pipe(size())
.pipe(gulp.dest('lib'))
})

gulp.task('build:node', ['clean:node'], (done) => {
const runSequence = require('run-sequence')

runSequence.use(gulp)(
'copy::node',
'build::node',
done
)
gulp.task('build:node', () => {
throw new Error('node builds are not supported anymore')
})
}
1 change: 0 additions & 1 deletion tasks/clean.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

module.exports = (gulp) => {
require('./clean/node')(gulp)
require('./clean/browser')(gulp)
}
9 changes: 0 additions & 9 deletions tasks/clean/node.js

This file was deleted.

1 change: 0 additions & 1 deletion tasks/release/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module.exports = (gulp) => {
gulp.task('release:node', (done) => {
runSequence.use(gulp)(
'release:pre-build:node',
'build:node',
'release:post-build',
done
)
Expand Down

0 comments on commit 0f7d392

Please # to comment.