Browse Source

Removing scaffolding, upgrading dependencies

plugin-mode
Eli Perelman 8 years ago
parent
commit
357585fee7
  1. 15
      packages/neutrino/README.md
  2. 36
      packages/neutrino/commands/init/index.js
  3. 13
      packages/neutrino/package.json
  4. 3155
      packages/neutrino/yarn.lock

15
packages/neutrino/README.md

@ -21,7 +21,6 @@ situation your preset doesn't cover.
- Preset-based Webpack building with development and production support
- Test web projects with Karma + Mocha, and Node.js projects with Mocha
- Scaffold out new projects with a built-in Yeoman wrapper.
## Core Presets
@ -31,7 +30,8 @@ situation your preset doesn't cover.
## Requirements
- Node.js v4+ and npm
- v3 (latest): Node.js v4+ and yarn
- v2: Node.js v4+ and npm
## Getting started
@ -47,7 +47,7 @@ dependencies. In this example, we want to build a React application:
npm install --save-dev neutrino neutrino-preset-react
```
With neutrino and your preset in place, modify the `npm scripts` in your package.json to use
With neutrino and your preset in place, modify the `scripts` in your package.json to use
neutrino for building the project:
```json
@ -64,11 +64,14 @@ By default, neutrino preset look for source code in `src/`, and tests in `test/`
scripts to start building!
```sh
npm start
# Build the application in development mode
yarn start
npm test
# Build the application and run any tests
yarn test
npm run build
# Build the application in production mode, outputting content to build/
yarn run build
```
If you plan to use the same preset across all your script targets, you can add a `config` entry to

36
packages/neutrino/commands/init/index.js

@ -1,36 +0,0 @@
'use strict';
const yeoman = require('yeoman-environment');
const npm = require('npm');
const path = require('path');
const temp = require('../../src/temp');
const env = yeoman.createEnv();
module.exports = (args, done) => {
// For initializing a project, the preset is not installed in the project.
// Rather, we install it ourselves into a temp directory and invoke from there.
const tempDir = temp();
const packageName = args.packageName;
npm.load({ loglevel: 'silent' }, (err, npm) => {
if (err) {
console.error(err);
return done(1);
}
const pkg = path.join(tempDir, 'node_modules', packageName.startsWith('@') || !packageName.includes(path.sep) ?
packageName :
path.basename(packageName));
npm.commands.install(tempDir, [packageName], (err) => {
if (err) {
console.error(err);
return done(1);
}
env.register(pkg, 'neutrino:init');
env.run('neutrino:init', done);
});
});
};

13
packages/neutrino/package.json

@ -1,6 +1,6 @@
{
"name": "neutrino",
"version": "2.2.0",
"version": "3.0.0",
"description": "Create and build JS applications with managed configurations",
"main": "bin/neutrino",
"bin": {
@ -44,17 +44,16 @@
"author": "Eli Perelman <eli@eliperelman.com>",
"license": "MPL-2.0",
"dependencies": {
"babel-register": "6.14.0",
"babel-register": "6.16.3",
"change-case": "3.0.0",
"karma": "1.3.0",
"mocha": "3.0.2",
"npm": "3.10.6",
"mocha": "3.1.2",
"resolve": "1.1.7",
"vorpal": "1.4.1",
"webpack": "1.13.2",
"webpack-dev-server": "1.16.2",
"webpack-hot-middleware": "2.12.2",
"webpack-merge": "0.14.1",
"yeoman-environment": "1.6.3"
"webpack-hot-middleware": "2.13.0",
"webpack-merge": "0.15.0",
"yeoman-environment": "1.6.5"
}
}

3155
packages/neutrino/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save