Skip to content

Commit

Permalink
Merge pull request #3 from Microsoft/master
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
jens1o authored Jul 31, 2017
2 parents 74f4752 + f24965c commit 563b40c
Show file tree
Hide file tree
Showing 1,754 changed files with 33,831 additions and 13,548 deletions.
10 changes: 5 additions & 5 deletions .github/classifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
accessibility: [],
api: [],
css-less-sass: [],
debug: [ isidorn ],
editor: [],
debug: [ weinand ],
editor: [ rebornix ],
editor-brackets: [],
editor-clipboard: [],
editor-colors: [],
Expand All @@ -30,7 +30,7 @@
i18n: [],
install-update: [],
integrated-terminal: [ Tyriar ],
javascript: [],
javascript: [ mjbvz ],
json: [],
languages basic: [],
markdown: [],
Expand All @@ -39,7 +39,7 @@
search: [ roblourens ],
snippets: [ jrieken ],
tasks: [],
typescript: [],
workbench: [ bpasero ],
typescript: [ mjbvz ],
workbench: [],
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ addons:
- libgtk2.0-0
- libx11-dev
- libxkbfile-dev
- libsecret-1-dev

before_install:
- git submodule update --init --recursive
Expand Down
25 changes: 15 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "0.1.0",
"configurations": [

{
"type": "node",
"request": "launch",
Expand Down Expand Up @@ -63,6 +64,20 @@
"${workspaceRoot}/out/**/*.js"
]
},
{
"type": "extensionHost",
"request": "launch",
"name": "VS Code Emmet Tests",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceRoot}/extensions/emmet/test-fixtures",
"--extensionDevelopmentPath=${workspaceRoot}/extensions/emmet",
"--extensionTestsPath=${workspaceRoot}/extensions/emmet/out/test"
],
"outFiles": [
"${workspaceRoot}/out/**/*.js"
]
},
{
"type": "extensionHost",
"request": "launch",
Expand Down Expand Up @@ -128,16 +143,6 @@
"${workspaceRoot}/extensions/git/out/**/*.js"
]
},
{
"name": "Attach to TS Server",
"type": "node",
"request": "attach",
"port": 5859,
"protocol": "legacy",
"outFiles": [
"${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js"
]
},
{
"type": "node",
"request": "launch",
Expand Down
11 changes: 9 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"type": "gulp",
"task": "tslint",
"label": "Run tslint",
"problemMatcher": ["$tslint4"]
"problemMatcher": [
"$tslint4"
]
},
{
"taskName": "Run tests",
Expand All @@ -59,6 +61,11 @@
"type": "gulp",
"task": "electron",
"label": "Download electron"
},
{
"type": "gulp",
"task": "hygiene",
"problemMatcher": []
}
]
}
}
4 changes: 2 additions & 2 deletions build/gulpfile.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var editorEntryPoints = [
{
name: 'vs/editor/editor.main',
include: [],
exclude: [],
prepend: [ 'vs/css.js', 'vs/nls.js' ],
exclude: [ 'vs/css', 'vs/nls' ],
prepend: [ 'out-build/vs/css.js', 'out-build/vs/nls.js' ],
},
{
name: 'vs/base/common/worker/simpleWorker',
Expand Down
2 changes: 2 additions & 0 deletions build/gulpfile.hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ const copyrightFilter = [
'!**/*.xpm',
'!**/*.opts',
'!**/*.disabled',
'!build/**/*.init',
'!resources/win32/bin/code.js',
'!extensions/markdown/media/tomorrow.css',
'!extensions/html/server/src/modes/typescript/*'
];

const eslintFilter = [
'src/**/*.js',
'build/gulpfile.*.js',
'!src/vs/loader.js',
'!src/vs/css.js',
'!src/vs/nls.js',
Expand Down
83 changes: 14 additions & 69 deletions build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ const shrinkwrap = require('../npm-shrinkwrap.json');
const crypto = require('crypto');
const i18n = require('./lib/i18n');
const glob = require('glob');
const os = require('os');
const cp = require('child_process');

const productDependencies = Object.keys(product.dependencies || {});
const dependencies = Object.keys(shrinkwrap.dependencies)
Expand All @@ -45,8 +43,8 @@ const nodeModules = ['electron', 'original-fs']
// Build

const builtInExtensions = [
{ name: 'ms-vscode.node-debug', version: '1.14.8' },
{ name: 'ms-vscode.node-debug2', version: '1.14.4' }
{ name: 'ms-vscode.node-debug', version: '1.15.19' },
{ name: 'ms-vscode.node-debug2', version: '1.15.5' }
];

const excludedExtensions = [
Expand All @@ -55,7 +53,7 @@ const excludedExtensions = [
];

const vscodeEntryPoints = _.flatten([
buildfile.entrypoint('vs/workbench/electron-browser/workbench.main'),
buildfile.entrypoint('vs/workbench/workbench.main'),
buildfile.base,
buildfile.workbench,
buildfile.code
Expand Down Expand Up @@ -137,7 +135,7 @@ const config = {
name: product.nameLong + ' document',
role: 'Editor',
ostypes: ["TEXT", "utxt", "TUTX", "****"],
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
iconFile: 'resources/darwin/code_file.icns'
}],
darwinBundleURLTypes: [{
Expand Down Expand Up @@ -219,16 +217,15 @@ function packageTask(platform, arch, opts) {
const out = opts.minified ? 'out-vscode-min' : 'out-vscode';

const checksums = computeChecksums(out, [
'vs/workbench/electron-browser/workbench.main.js',
'vs/workbench/electron-browser/workbench.main.css',
'vs/workbench/workbench.main.js',
'vs/workbench/workbench.main.css',
'vs/workbench/electron-browser/bootstrap/index.html',
'vs/workbench/electron-browser/bootstrap/index.js',
'vs/workbench/electron-browser/bootstrap/preload.js'
]);

const src = gulp.src(out + '/**', { base: '.' })
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + out), 'out'); }))
.pipe(util.setExecutableBit(['**/*.sh']));
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + out), 'out'); }));

const root = path.resolve(path.join(__dirname, '..'));
const localExtensionDescriptions = glob.sync('extensions/*/package.json')
Expand Down Expand Up @@ -259,12 +256,9 @@ function packageTask(platform, arch, opts) {
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
}));

const sources = es.merge(
src,
localExtensions,
localExtensionDependencies,
marketplaceExtensions
).pipe(filter(['**', '!**/*.js.map']));
const sources = es.merge(src, localExtensions, localExtensionDependencies, marketplaceExtensions)
.pipe(util.setExecutableBit(['**/*.sh']))
.pipe(filter(['**', '!**/*.js.map']));

let version = packageJson.version;
const quality = product.quality;
Expand All @@ -283,13 +277,16 @@ function packageTask(platform, arch, opts) {

const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' });

const watermark = gulp.src(['resources/letterpress.svg', 'resources/letterpress-dark.svg', 'resources/letterpress-hc.svg'], { base: '.' });

// TODO the API should be copied to `out` during compile, not here
const api = gulp.src('src/vs/vscode.d.ts').pipe(rename('out/vs/vscode.d.ts'));

const depsSrc = _.flatten(dependencies
.map(function (d) { return ['node_modules/' + d + '/**', '!node_modules/' + d + '/**/{test,tests}/**']; }));

const deps = gulp.src(depsSrc, { base: '.', dot: true })
.pipe(filter(['**', '!**/package-lock.json']))
.pipe(util.cleanNodeModule('fsevents', ['binding.gyp', 'fsevents.cc', 'build/**', 'src/**', 'test/**'], ['**/*.node']))
.pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/*.js']))
.pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
Expand All @@ -306,6 +303,7 @@ function packageTask(platform, arch, opts) {
packageJsonStream,
productJsonStream,
license,
watermark,
api,
sources,
deps
Expand Down Expand Up @@ -371,59 +369,6 @@ gulp.task('vscode-linux-ia32-min', ['minify-vscode', 'clean-vscode-linux-ia32'],
gulp.task('vscode-linux-x64-min', ['minify-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64', { minified: true }));
gulp.task('vscode-linux-arm-min', ['minify-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm', { minified: true }));

// --- v8 snapshots ---

function snapshotTask(platform, arch) {

const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : '');

let command = path.join(process.cwd(), 'node_modules/.bin/mksnapshot');
let loaderInputFilepath;
let startupBlobFilepath;

if (platform === 'darwin') {
loaderInputFilepath = path.join(destination, 'Code - OSS.app/Contents/Resources/app/out/vs/loader.js');
startupBlobFilepath = path.join(destination, 'Code - OSS.app/Contents/Frameworks/Electron Framework.framework/Resources/snapshot_blob.bin')

} else if (platform === 'win32') {
command = `${command}.cmd`;
loaderInputFilepath = path.join(destination, 'resources/app/out/vs/loader.js');
startupBlobFilepath = path.join(destination, 'snapshot_blob.bin')

} else if (platform === 'linux') {
// TODO
return () => { };
}

return () => {
const inputFile = fs.readFileSync(loaderInputFilepath);
const wrappedInputFile = `
var Monaco_Loader_Init;
(function() {
var doNotInitLoader = true;
${inputFile.toString()};
Monaco_Loader_Init = function() {
AMDLoader.init();
CSSLoaderPlugin.init();
NLSLoaderPlugin.init();
return define;
}
})();
`;
const wrappedInputFilepath = path.join(os.tmpdir(), 'wrapped-loader.js');
console.log(wrappedInputFilepath);
fs.writeFileSync(wrappedInputFilepath, wrappedInputFile);

cp.execFileSync(command, [wrappedInputFilepath, `--startup_blob`, startupBlobFilepath]);
}
}

gulp.task('vscode-darwin-snapshots', ['vscode-darwin-min'], snapshotTask('darwin', undefined));
gulp.task('vscode-win32-ia32-snapshots', ['vscode-win32-ia32'], snapshotTask('win32', 'ia32'));
gulp.task('vscode-win32-x64-snapshots', ['vscode-win32-x64'], snapshotTask('win32', 'x64'));


// Transifex Localizations
const vscodeLanguages = [
'zh-hans',
Expand Down
1 change: 1 addition & 0 deletions build/lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function fromLocal(extensionPath) {
.map(function (fileName) { return path.join(extensionPath, fileName); })
.map(function (filePath) { return new File({
path: filePath,
stat: fs.statSync(filePath),
base: extensionPath,
contents: fs.createReadStream(filePath)
}); });
Expand Down
1 change: 1 addition & 0 deletions build/lib/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function fromLocal(extensionPath: string): Stream {
.map(fileName => path.join(extensionPath, fileName))
.map(filePath => new File({
path: filePath,
stat: fs.statSync(filePath),
base: extensionPath,
contents: fs.createReadStream(filePath) as any
}));
Expand Down
Loading

0 comments on commit 563b40c

Please sign in to comment.