The kibana app itself requires that package.json exist, so removing it
entirely from distributions is a no go. Instead, we remove only the
dependencies themselves from the package.json so people do not try to
reinstall dependencies on an official distribution.
We're not maintaining the shrinkwrap as part of the repo, and it doesn't
add any value when being generated automatically as part of our build
process. In its current form, it actually makes it so we cannot
successfully create new builds without manually setting up a local
shrinkwrap first.
The npm shrinkwrap that we generate during build in order to package
with distributions is now properly created based on the built
dependencies rather than the local dev install.
During build we transpile the server source to prevent runtime transpilation with babel/register. In order to support untranspiled plugin code, we still use babel/register with special ignore options, which used to be included in cli/index.js and now is moved to src/optimize/babelOptions.js so other code that wants to initialize a server (without the cli) can also configure babel/register.
Since npm is creating a shrinkwrap file that ignores devDeps it logs a huge number of warnings, and since these warnings are logged to stderr they are not hidden by exec.silent(). This changes the logLevel to "error" for these commands and removes the `.silent()` call so that it is clear what is happening
While working to reintroduce shrinkwrap into our workflow it became
apparent that we needed to be using npm3 but unfortunately node-gyp
is not compatible with iojs, and the iojs distros actually contain a
patched version. This means that you can only use iojs with the npm
it ships with.
When trying to find a solution for this issue, we contemplated not
using npm3, but that would mean that we can't use npm-shrinkwrap and
decided that since we are using babel anyway that switching back to
node was the best option.
The only code that must be updated to work in the new node 0.12 env
is lodash templates that use the template string syntax inside their
source (Since 0.12 does not support template strings).
build will create it if it's missing, copy it to the build and also create a version without dev deps
release requires it and fatals if it doesn't exist
Conflicts:
tasks/build/index.js