Files
atom/script/build
Nathan Sobo e949984fe8 Add API docs generation to new build script
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-03 09:45:43 -06:00

55 lines
1.8 KiB
JavaScript
Executable File

#!/usr/bin/env node
'use strict'
// Needed so we can require src/module-cache.coffee during generateModuleCache
require('coffee-script/register')
require('colors')
const argv = require('yargs').argv
const cleanOutputDirectory = require('./lib/clean-output-directory')
const codeSign = require('./lib/code-sign')
const copyAssets = require('./lib/copy-assets')
const dumpSymbols = require('./lib/dump-symbols')
const generateAPIDocs = require('./lib/generate-api-docs')
const generateMetadata = require('./lib/generate-metadata')
const generateModuleCache = require('./lib/generate-module-cache')
const installApplication = require('./lib/install-application')
const packageApplication = require('./lib/package-application')
const prebuildLessCache = require('./lib/prebuild-less-cache')
const transpileBabelPaths = require('./lib/transpile-babel-paths')
const transpileCoffeeScriptPaths = require('./lib/transpile-coffee-script-paths')
const transpileCsonPaths = require('./lib/transpile-cson-paths')
const transpilePegJsPaths = require('./lib/transpile-peg-js-paths')
process.on('unhandledRejection', function (e) {
console.error(e)
process.exit(1)
})
cleanOutputDirectory()
copyAssets()
transpileBabelPaths()
transpileCoffeeScriptPaths()
transpileCsonPaths()
transpilePegJsPaths()
generateModuleCache()
prebuildLessCache()
generateMetadata()
generateAPIDocs()
dumpSymbols()
.then(packageApplication)
.then(packagedAppPath => {
if (argv.codeSign) {
codeSign(packagedAppPath)
} else {
console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing...'.gray)
}
if (argv.install) {
installApplication(packagedAppPath)
} else {
console.log('Skipping installation. Specify the --install option to install Atom...'.gray)
}
})