Comparing version 0.4.15 to 0.4.16
@@ -679,3 +679,3 @@ "use strict"; | ||
qr.generate(address, function (code) { | ||
logger.info(code); | ||
logger.info('\n' + code); | ||
}); | ||
@@ -682,0 +682,0 @@ if (!!containerized()) return [3, 8]; |
@@ -11,5 +11,5 @@ "use strict"; | ||
ApolloPlugin.prototype.configure = function (builder, spin) { | ||
if (builder.stack.hasAll(['apollo', 'webpack'])) { | ||
var persistGraphQL = spin.options.persistGraphQL && !spin.test && !builder.stack.hasAny('dll'); | ||
if (builder.stack.hasAny(['server', 'web']) && !builder.stack.hasAny('dll')) { | ||
if (!builder.stack.hasAny('dll') && builder.stack.hasAll(['apollo', 'webpack'])) { | ||
var persistGraphQL = spin.options.persistGraphQL && !spin.test; | ||
if (builder.stack.hasAny(['server', 'web'])) { | ||
if (!persistPlugins) { | ||
@@ -58,5 +58,6 @@ var PersistGraphQLPlugin = requireModule_1.default('persistgraphql-webpack-plugin'); | ||
builder.config = spin.merge(builder.config, { | ||
plugins: [new webpack.DefinePlugin({ __PERSIST_GQL__: persistGraphQL })].concat(builder.stack.hasAny('dll') | ||
? [] | ||
: [builder.stack.hasAny('server') ? persistPlugins.server : persistPlugins.client]) | ||
plugins: [ | ||
new webpack.DefinePlugin({ __PERSIST_GQL__: persistGraphQL }), | ||
builder.stack.hasAny('server') ? persistPlugins.server : persistPlugins.client | ||
] | ||
}); | ||
@@ -63,0 +64,0 @@ } |
@@ -10,3 +10,3 @@ "use strict"; | ||
var dev = spin.dev; | ||
if (stack.hasAll('webpack')) { | ||
if (stack.hasAll('webpack') && !stack.hasAny('dll')) { | ||
var createRule = void 0; | ||
@@ -13,0 +13,0 @@ var rules = []; |
@@ -13,3 +13,3 @@ "use strict"; | ||
entry: { | ||
index: [requireModule_1.default.resolve('babel-polyfill')] | ||
index: ['babel-polyfill'] | ||
} | ||
@@ -16,0 +16,0 @@ }, builder.config); |
@@ -79,3 +79,3 @@ "use strict"; | ||
entry: { | ||
vendor: [require.resolve("./react-native/react-native-polyfill-" + reactVer + ".js")] | ||
vendor: ["spinjs/lib/plugins/react-native/react-native-polyfill-" + reactVer + ".js"] | ||
} | ||
@@ -97,3 +97,3 @@ }); | ||
entry: { | ||
index: [require.resolve("./react-native/react-native-polyfill-" + reactVer + ".js")] | ||
index: ["spinjs/lib/plugins/react-native/react-native-polyfill-" + reactVer + ".js"] | ||
} | ||
@@ -100,0 +100,0 @@ }, builder.config); |
@@ -9,3 +9,4 @@ "use strict"; | ||
var stack = builder.stack; | ||
if (stack.hasAll(['webpack', 'web']) || (stack.hasAll(['webpack', 'server']) && spin.options.ssr)) { | ||
if (!stack.hasAny('dll') && | ||
(stack.hasAll(['webpack', 'web']) || (stack.hasAll(['webpack', 'server']) && spin.options.ssr))) { | ||
builder.config = spin.merge(builder.config, { | ||
@@ -47,3 +48,3 @@ module: { | ||
} | ||
else if (stack.hasAll(['webpack', 'server']) && !spin.options.ssr) { | ||
else if (!stack.hasAny('dll') && stack.hasAll(['webpack', 'server']) && !spin.options.ssr) { | ||
var ignoreLoader = requireModule_1.default.resolve('ignore-loader'); | ||
@@ -50,0 +51,0 @@ builder.config = spin.merge(builder.config, { |
@@ -20,3 +20,3 @@ "use strict"; | ||
var webpack = requireModule_1.default('webpack'); | ||
var buildNodeEnv = spin.dev ? (spin.test ? 'test' : 'development') : 'production'; | ||
var buildNodeEnv = process.env.NODE_ENV || (spin.dev ? (spin.test ? 'test' : 'development') : 'production'); | ||
var plugins = []; | ||
@@ -23,0 +23,0 @@ if (spin.dev) { |
{ | ||
"name": "spinjs", | ||
"version": "0.4.15", | ||
"version": "0.4.16", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "clean": "rm -rf ./lib", |
@@ -1,6 +0,6 @@ | ||
<p align="center"><a href="#"><img width="150" src="https://rawgit.com/sysgears/spin.js/master/logo.svg"></a></p> | ||
<p align="center"><a href="#"><img width="150" src="https://rawgit.com/sysgears/spinjs/master/logo.svg"></a></p> | ||
## Spin.js - the best build tool - is the one that don't need build rules | ||
## spinjs - the best build tool - is the one that don't need build rules | ||
[![Join the chat at https://gitter.im/sysgears/spin.js](https://badges.gitter.im/sysgears/spin.js.svg)](https://gitter.im/sysgears/spin.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![Join the chat at https://gitter.im/sysgears/spinjs](https://badges.gitter.im/sysgears/spinjs.svg)](https://gitter.im/sysgears/spinjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![npm version](https://badge.fury.io/js/spinjs.svg)](https://badge.fury.io/js/spinjs) [![Twitter Follow](https://img.shields.io/twitter/follow/sysgears.svg?style=social)](https://twitter.com/sysgears) | ||
@@ -16,5 +16,5 @@ | ||
> `spin.js` was created to free the developer from build rules writing for JavaScript projects as much as possible. | ||
> Its difference from many other build tools with similair goals is that `spin.js` is not tied to specific framework | ||
> and does not attempt to lock you out from generated config. `spin.js` does its best to provide you with very mature | ||
> `spinjs` was created to free the developer from build rules writing for JavaScript projects as much as possible. | ||
> Its difference from many other build tools with similair goals is that `spinjs` is not tied to specific framework | ||
> and does not attempt to lock you out from generated config. `spinjs` does its best to provide you with very mature | ||
> build setup from the minimal information provided by you about your tech stack and lets you further customize | ||
@@ -25,3 +25,3 @@ > every aspect of build setup when needed. | ||
The basic `spin.js` usage is simple: you describe the stack used in your application in the property `spin` of `package.json`: | ||
The basic `spinjs` usage is simple: you describe the stack used in your application in the property `spin` of `package.json`: | ||
```json | ||
@@ -51,5 +51,11 @@ { | ||
To see generated Webpack config add `-v` option to any of the above commands, e.g.: | ||
``` bash | ||
spin -v watch | ||
``` | ||
will launch project in development mode and will dump generated Webpack config in a terminal. | ||
## Supported technologies stack | ||
At the moment `spin.js` supports the following technologies, that can be specified inside `stack` property: | ||
At the moment `spinjs` supports the following technologies, that can be specified inside `stack` property: | ||
@@ -78,3 +84,3 @@ |Technology |Description| | ||
`spin.js` configures and launches multiple builders in parallel to build the project. If stack for the project is specified | ||
`spinjs` configures and launches multiple builders in parallel to build the project. If stack for the project is specified | ||
in `spin` property of `package.json`, then only one builder is launched. To specify multiple builders the following | ||
@@ -100,6 +106,6 @@ configuration should be used: | ||
The 'spin.js' configuration can be specified in `.spinrc.json` instead of `package.json`, it should contain the value of | ||
The 'spinjs' configuration can be specified in `.spinrc.json` instead of `package.json`, it should contain the value of | ||
`spin` property in this case. | ||
Each builder has a name and a `stack` property at minimum. Builder properties recognized by `spin.js`: | ||
Each builder has a name and a `stack` property at minimum. Builder properties recognized by `spinjs`: | ||
@@ -114,3 +120,3 @@ |Builder Option |Description| | ||
Builder can also have builder-specific options, depending on its stack, recognized by `spin.js` plugins. | ||
Builder can also have builder-specific options, depending on its stack, recognized by `spinjs` plugins. | ||
@@ -122,3 +128,3 @@ Options that are non-specific to each builder but rather to application as a whole can be specified in | ||
|--------------------------|-----------| | ||
|plugins|Additional `spin.js` plugins module names| | ||
|plugins|Additional `spinjs` plugins module names| | ||
|backendBuildDir|Output directory for code targeted to run under Node.js| | ||
@@ -133,7 +139,7 @@ |frontendBuildDir|Output directory for code targeted to run in Web Browser and on mobile devices| | ||
Each `spin.js` plugin tries to handle subset of technologies in the builder stack to configure build tools | ||
Each `spinjs` plugin tries to handle subset of technologies in the builder stack to configure build tools | ||
usually used for this stack the best way. After configuration of the builder it gets executed in the mode | ||
that specified in `spin` command line, i.e. `watch`, `build`, `test`, etc. | ||
There are several built-in plugins supplied with `spin.js`. External plugins can be specified inside | ||
There are several built-in plugins supplied with `spinjs`. External plugins can be specified inside | ||
`options -> plugins` property. | ||
@@ -155,3 +161,3 @@ | ||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
| [<img src="https://avatars1.githubusercontent.com/u/1259926?v=3" width="100px;"/><br /><sub>Victor Vlasenko</sub>](https://ua.linkedin.com/in/victorvlasenko)<br />[💻](https://github.com/sysgears/spin.js/commits?author=vlasenko "Code") [🔧](#tool-vlasenko "Tools") [📖](https://github.com/sysgears/spin.js/commits?author=vlasenko "Documentation") [⚠️](https://github.com/sysgears/spin.js/commits?author=vlasenko "Tests") [💬](#question-vlasenko "Answering Questions") [👀](#review-vlasenko "Reviewed Pull Requests") | [<img src="https://avatars0.githubusercontent.com/u/4072250?v=3" width="100px;"/><br /><sub>Ujjwal</sub>](https://github.com/mairh)<br />[💻](https://github.com/sysgears/spin.js/commits?author=mairh "Code") [🔧](#tool-mairh "Tools") [📖](https://github.com/sysgears/spin.js/commits?author=mairh "Documentation") [⚠️](https://github.com/sysgears/spin.js/commits?author=mairh "Tests") [💬](#question-mairh "Answering Questions") [👀](#review-mairh "Reviewed Pull Requests") | | ||
| [<img src="https://avatars1.githubusercontent.com/u/1259926?v=3" width="100px;"/><br /><sub>Victor Vlasenko</sub>](https://ua.linkedin.com/in/victorvlasenko)<br />[💻](https://github.com/sysgears/spinjs/commits?author=vlasenko "Code") [🔧](#tool-vlasenko "Tools") [📖](https://github.com/sysgears/spinjs/commits?author=vlasenko "Documentation") [⚠️](https://github.com/sysgears/spinjs/commits?author=vlasenko "Tests") [💬](#question-vlasenko "Answering Questions") [👀](#review-vlasenko "Reviewed Pull Requests") | [<img src="https://avatars0.githubusercontent.com/u/4072250?v=3" width="100px;"/><br /><sub>Ujjwal</sub>](https://github.com/mairh)<br />[💻](https://github.com/sysgears/spinjs/commits?author=mairh "Code") [🔧](#tool-mairh "Tools") [📖](https://github.com/sysgears/spinjs/commits?author=mairh "Documentation") [⚠️](https://github.com/sysgears/spinjs/commits?author=mairh "Tests") [💬](#question-mairh "Answering Questions") [👀](#review-mairh "Reviewed Pull Requests") | | ||
| :---: | :---: | | ||
@@ -167,3 +173,3 @@ <!-- ALL-CONTRIBUTORS-LIST:END --> | ||
[SysGears INC]: http://sysgears.com | ||
[Gitter channel]: https://gitter.im/sysgears/spin.js | ||
[GitHub issues]: https://github.com/sysgears/spin.js/issues | ||
[Gitter channel]: https://gitter.im/sysgears/spinjs | ||
[GitHub issues]: https://github.com/sysgears/spinjs/issues |
@@ -686,3 +686,3 @@ import { spawn } from 'child_process'; | ||
qr.generate(address, code => { | ||
logger.info(code); | ||
logger.info('\n' + code); | ||
}); | ||
@@ -689,0 +689,0 @@ if (!containerized()) { |
@@ -13,5 +13,5 @@ import * as path from 'path'; | ||
public configure(builder: Builder, spin: Spin) { | ||
if (builder.stack.hasAll(['apollo', 'webpack'])) { | ||
const persistGraphQL = spin.options.persistGraphQL && !spin.test && !builder.stack.hasAny('dll'); | ||
if (builder.stack.hasAny(['server', 'web']) && !builder.stack.hasAny('dll')) { | ||
if (!builder.stack.hasAny('dll') && builder.stack.hasAll(['apollo', 'webpack'])) { | ||
const persistGraphQL = spin.options.persistGraphQL && !spin.test; | ||
if (builder.stack.hasAny(['server', 'web'])) { | ||
if (!persistPlugins) { | ||
@@ -68,7 +68,6 @@ const PersistGraphQLPlugin = requireModule('persistgraphql-webpack-plugin'); | ||
builder.config = spin.merge(builder.config, { | ||
plugins: [new webpack.DefinePlugin({ __PERSIST_GQL__: persistGraphQL })].concat( | ||
builder.stack.hasAny('dll') | ||
? [] | ||
: [builder.stack.hasAny('server') ? persistPlugins.server : persistPlugins.client] | ||
) | ||
plugins: [ | ||
new webpack.DefinePlugin({ __PERSIST_GQL__: persistGraphQL }), | ||
builder.stack.hasAny('server') ? persistPlugins.server : persistPlugins.client | ||
] | ||
}); | ||
@@ -75,0 +74,0 @@ } |
@@ -11,3 +11,3 @@ import { Builder } from '../Builder'; | ||
if (stack.hasAll('webpack')) { | ||
if (stack.hasAll('webpack') && !stack.hasAny('dll')) { | ||
let createRule; | ||
@@ -14,0 +14,0 @@ const rules = []; |
@@ -14,3 +14,3 @@ import { Builder } from '../Builder'; | ||
entry: { | ||
index: [requireModule.resolve('babel-polyfill')] | ||
index: ['babel-polyfill'] | ||
} | ||
@@ -17,0 +17,0 @@ }, |
@@ -92,3 +92,3 @@ import * as path from 'path'; | ||
entry: { | ||
vendor: [require.resolve(`./react-native/react-native-polyfill-${reactVer}.js`)] | ||
vendor: [`spinjs/lib/plugins/react-native/react-native-polyfill-${reactVer}.js`] | ||
} | ||
@@ -110,3 +110,3 @@ }); | ||
entry: { | ||
index: [require.resolve(`./react-native/react-native-polyfill-${reactVer}.js`)] | ||
index: [`spinjs/lib/plugins/react-native/react-native-polyfill-${reactVer}.js`] | ||
} | ||
@@ -113,0 +113,0 @@ }, |
@@ -10,3 +10,6 @@ import { Builder } from '../Builder'; | ||
if (stack.hasAll(['webpack', 'web']) || (stack.hasAll(['webpack', 'server']) && spin.options.ssr)) { | ||
if ( | ||
!stack.hasAny('dll') && | ||
(stack.hasAll(['webpack', 'web']) || (stack.hasAll(['webpack', 'server']) && spin.options.ssr)) | ||
) { | ||
builder.config = spin.merge(builder.config, { | ||
@@ -47,3 +50,3 @@ module: { | ||
}); | ||
} else if (stack.hasAll(['webpack', 'server']) && !spin.options.ssr) { | ||
} else if (!stack.hasAny('dll') && stack.hasAll(['webpack', 'server']) && !spin.options.ssr) { | ||
const ignoreLoader = requireModule.resolve('ignore-loader'); | ||
@@ -50,0 +53,0 @@ builder.config = spin.merge(builder.config, { |
@@ -17,3 +17,3 @@ import * as ip from 'ip'; | ||
const webpack = requireModule('webpack'); | ||
const buildNodeEnv = spin.dev ? (spin.test ? 'test' : 'development') : 'production'; | ||
const buildNodeEnv = process.env.NODE_ENV || (spin.dev ? (spin.test ? 'test' : 'development') : 'production'); | ||
@@ -20,0 +20,0 @@ let plugins = []; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
292436
4892
166
11