This commit is contained in:
Antonio Scandurra
2017-02-23 17:04:43 +01:00
parent 2a26051539
commit e624f24b6d
6 changed files with 66 additions and 89 deletions

View File

@@ -4,7 +4,7 @@
// Run bootstrap first to ensure all the dependencies used later in this script
// are installed.
require('./bootstrap')
// require('./bootstrap')
// Needed so we can require src/module-cache.coffee during generateModuleCache
require('coffee-script/register')
@@ -51,58 +51,57 @@ process.on('unhandledRejection', function (e) {
checkChromedriverVersion()
cleanOutputDirectory()
downloadChromedriver()
copyAssets()
transpileBabelPaths()
transpileCoffeeScriptPaths()
transpileCsonPaths()
transpilePegJsPaths()
generateModuleCache()
prebuildLessCache()
generateMetadata()
// generateModuleCache()
// prebuildLessCache()
// generateMetadata()
generateStartupSnapshot()
generateAPIDocs()
dumpSymbols()
.then(packageApplication)
.then(packagedAppPath => {
if (process.platform === 'darwin') {
if (argv.codeSign) {
codeSignOnMac(packagedAppPath)
} else {
console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray)
}
} else if (process.platform === 'win32') {
if (argv.createWindowsInstaller) {
return createWindowsInstaller(packagedAppPath, argv.codeSign).then(() => packagedAppPath)
}
else {
console.log('Skipping creating installer. Specify the --create-windows-installer option to create a Squirrel-based Windows installer. Code-signing was skipped too.'.gray)
}
} else if (process.platform === 'linux') {
if (argv.createDebianPackage) {
createDebianPackage(packagedAppPath)
} else {
console.log('Skipping creating debian package. Specify the --create-debian-package option to create it.'.gray)
}
if (argv.createRpmPackage) {
createRpmPackage(packagedAppPath)
} else {
console.log('Skipping creating rpm package. Specify the --create-rpm-package option to create it.'.gray)
}
}
return Promise.resolve(packagedAppPath)
}).then(packagedAppPath => {
if (argv.compressArtifacts) {
compressArtifacts(packagedAppPath)
} else {
console.log('Skipping artifacts compression. Specify the --compress-artifacts option to compress Atom binaries (and symbols on macOS)'.gray)
}
if (argv.install) {
installApplication(packagedAppPath)
} else {
console.log('Skipping installation. Specify the --install option to install Atom'.gray)
}
})
// generateAPIDocs()
// dumpSymbols()
// .then(packageApplication)
// .then(packagedAppPath => {
// if (process.platform === 'darwin') {
// if (argv.codeSign) {
// codeSignOnMac(packagedAppPath)
// } else {
// console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray)
// }
// } else if (process.platform === 'win32') {
// if (argv.createWindowsInstaller) {
// return createWindowsInstaller(packagedAppPath, argv.codeSign).then(() => packagedAppPath)
// }
// else {
// console.log('Skipping creating installer. Specify the --create-windows-installer option to create a Squirrel-based Windows installer. Code-signing was skipped too.'.gray)
// }
// } else if (process.platform === 'linux') {
// if (argv.createDebianPackage) {
// createDebianPackage(packagedAppPath)
// } else {
// console.log('Skipping creating debian package. Specify the --create-debian-package option to create it.'.gray)
// }
//
// if (argv.createRpmPackage) {
// createRpmPackage(packagedAppPath)
// } else {
// console.log('Skipping creating rpm package. Specify the --create-rpm-package option to create it.'.gray)
// }
// }
//
// return Promise.resolve(packagedAppPath)
// }).then(packagedAppPath => {
// if (argv.compressArtifacts) {
// compressArtifacts(packagedAppPath)
// } else {
// console.log('Skipping artifacts compression. Specify the --compress-artifacts option to compress Atom binaries (and symbols on macOS)'.gray)
// }
//
// if (argv.install) {
// installApplication(packagedAppPath)
// } else {
// console.log('Skipping installation. Specify the --install option to install Atom'.gray)
// }
// })

View File

@@ -9,7 +9,7 @@ module.exports = function () {
const coreModules = new Set([
'path', 'electron', 'module', 'fs', 'child_process', 'crypto', 'url',
'atom', 'vm', 'events', 'os', 'assert', 'buffer', 'tty', 'net', 'constants',
'http', 'https', 'shell', 'querystring', 'zlib', 'stream', 'WNdb', 'lapack'
'http', 'https', 'shell', 'querystring', 'zlib', 'stream', 'WNdb', 'lapack', 'remote'
])
const baseDirPath = path.join(CONFIG.intermediateAppPath, 'static')
const snapshotScriptContent = electronLink({
@@ -26,14 +26,21 @@ module.exports = function () {
relativePath == path.join('..', 'src', 'electron-shims.js') ||
relativePath == path.join('..', 'src', 'module-cache.js') ||
relativePath == path.join('..', 'src', 'safe-clipboard.js') ||
relativePath == path.join('..', 'node_modules', 'archive-view', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'archive-view', 'node_modules', 'decompress-zip', 'lib', 'decompress-zip.js') ||
relativePath == path.join('..', 'node_modules', 'archive-view', 'node_modules', 'temp', 'lib', 'temp.js') ||
relativePath == path.join('..', 'node_modules', 'archive-view', 'node_modules', 'tar', 'tar.js') ||
relativePath == path.join('..', 'node_modules', 'atom-keymap', 'lib', 'command-event.js') ||
relativePath == path.join('..', 'node_modules', 'atom-keymap', 'lib', 'helpers.js') ||
relativePath == path.join('..', 'node_modules', 'babel-core', 'index.js') ||
relativePath == path.join('..', 'node_modules', 'clear-cut', 'index.js') ||
relativePath == path.join('..', 'node_modules', 'coffee-script', 'lib', 'coffee-script', 'register.js') ||
relativePath == path.join('..', 'node_modules', 'cson-parser', 'node_modules', 'coffee-script', 'lib', 'coffee-script', 'register.js') ||
relativePath == path.join('..', 'node_modules', 'find-and-replace', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'decompress-zip', 'lib', 'decompress-zip.js') ||
relativePath == path.join('..', 'node_modules', 'exception-reporting', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'symbols-view', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'git-utils', 'lib', 'git.js') ||
relativePath == path.join('..', 'node_modules', 'glob', 'glob.js') ||
relativePath == path.join('..', 'node_modules', 'htmlparser2', 'lib', 'index.js') ||
@@ -41,6 +48,9 @@ module.exports = function () {
relativePath == path.join('..', 'node_modules', 'less', 'lib', 'less', 'fs.js') ||
relativePath == path.join('..', 'node_modules', 'less', 'node_modules', 'graceful-fs', 'graceful-fs.js') ||
relativePath == path.join('..', 'node_modules', 'marker-index', 'dist', 'native', 'marker-index.js') ||
relativePath == path.join('..', 'node_modules', 'metrics', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'notifications', 'node_modules', 'fs-plus', 'lib', 'fs-plus.js') ||
relativePath == path.join('..', 'node_modules', 'superstring', 'index.js') ||
relativePath == path.join('..', 'node_modules', 'mime', 'mime.js') ||
relativePath == path.join('..', 'node_modules', 'oniguruma', 'lib', 'oniguruma.js') ||
relativePath == path.join('..', 'node_modules', 'pathwatcher', 'lib', 'main.js') ||
@@ -51,6 +61,7 @@ module.exports = function () {
relativePath == path.join('..', 'node_modules', 'spellchecker', 'lib', 'spellchecker.js') ||
relativePath == path.join('..', 'node_modules', 'styleguide', 'node_modules', 'coffee-script', 'lib', 'coffee-script', 'register.js') ||
relativePath == path.join('..', 'node_modules', 'tar', 'tar.js') ||
relativePath == path.join('..', 'node_modules', 'tree-view', 'node_modules', 'pathwatcher', 'lib', 'main.js') ||
relativePath == path.join('..', 'node_modules', 'text-buffer', 'node_modules', 'pathwatcher', 'lib', 'main.js') ||
relativePath == path.join('..', 'node_modules', 'temp', 'lib', 'temp.js') ||
relativePath == path.join('..', 'node_modules', 'tmp', 'lib', 'tmp.js')

View File

@@ -28,6 +28,7 @@ function getPathsToTranspile () {
paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, 'benchmarks', '**', '*.js')))
paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, 'exports', '**', '*.js')))
paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, 'src', '**', '*.js')))
paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, '**', 'atom-select-list', 'src', 'select-list-view.js')))
for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) {
paths = paths.concat(glob.sync(
path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, '**', '*.js'),

View File

@@ -35,8 +35,7 @@ exports.compile = function (sourceCode, filePath) {
var output = CoffeeScript.compile(sourceCode, {
filename: filePath,
sourceFiles: [filePath],
inlineMap: true
sourceFiles: [filePath]
})
// Strip sourceURL from output so there wouldn't be duplicate entries

View File

@@ -3,6 +3,7 @@ ApplicationDelegate = require './application-delegate'
Clipboard = require './clipboard'
TextEditor = require './text-editor'
TextEditorComponent = require './text-editor-component'
require('about')
require('archive-view')
require('autocomplete-atom-api')
@@ -38,48 +39,15 @@ require('package-generator')
require('settings-view')
require('snippets')
require('spell-check')
# require('status-bar')
require('status-bar')
require('styleguide')
require('symbols-view')
require('tabs')
require('timecop')
require('tree-view')
# require('update-package-dependencies')
require('update-package-dependencies')
require('welcome')
require('whitespace')
# require('wrap-guide')
# require('language-c')
# require('language-clojure')
# require('language-coffee-script')
# require('language-csharp')
# require('language-css')
# require('language-gfm')
# require('language-git')
# require('language-go')
# require('language-html')
# require('language-hyperlink')
# require('language-java')
# require('language-javascript')
# require('language-json')
# require('language-less')
# require('language-make')
# require('language-mustache')
# require('language-objective-c')
# require('language-perl')
# require('language-php')
# require('language-property-list')
# require('language-python')
# require('language-ruby')
# require('language-ruby-on-rails')
# require('language-sass')
# require('language-shellscript')
# require('language-source')
# require('language-sql')
# require('language-text')
# require('language-todo')
# require('language-toml')
# require('language-xml')
# require('language-yaml')
# Like sands through the hourglass, so are the days of our lives.
module.exports = ->

View File

@@ -1,5 +1,4 @@
{
"sourceMap": "inline",
"plugins": [
["add-module-exports", {}],
["transform-async-to-generator", {}],