-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
quantlab
committed
Dec 5, 2017
1 parent
640d268
commit 79d56d5
Showing
345 changed files
with
160,174 additions
and
7,506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
quantlab/yarn.js binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
yarn-path "./quantlab/staging/yarn.js" | ||
workspaces-experimental true | ||
registry "https://registry.npmjs.org" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "@quantlab/buildutils", | ||
"version": "0.1.0", | ||
"description": "QuantLab - Build Utilities", | ||
"homepage": "https://github.com/quantlabio/quantlab", | ||
"bugs": { | ||
"url": "https://github.com/quantlabio/quantlab/issues" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Project Jupyter", | ||
"files": [ | ||
"lib/*.d.ts", | ||
"lib/*.js.map", | ||
"lib/*.js", | ||
"template/package.json", | ||
"template/tsconfig.json", | ||
"template/src/index.ts" | ||
], | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"directories": { | ||
"lib": "lib/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/quantlabio/quantlab.git" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"clean": "rimraf lib", | ||
"prepublishOnly": "npm run build", | ||
"watch": "tsc -w" | ||
}, | ||
"dependencies": { | ||
"child_process": "~1.0.2", | ||
"fs-extra": "~4.0.2", | ||
"glob": "~7.1.2", | ||
"inquirer": "~3.3.0", | ||
"path": "~0.12.7", | ||
"sort-package-json": "~1.7.1", | ||
"typescript": "~2.6.2" | ||
}, | ||
"devDependencies": { | ||
"@types/fs-extra": "~4.0.3", | ||
"@types/glob": "~5.0.33", | ||
"@types/inquirer": "~0.0.35", | ||
"@types/node": "~8.0.47", | ||
"rimraf": "~2.6.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
import * as fs from 'fs-extra'; | ||
import * as path from 'path'; | ||
import * as utils from './utils'; | ||
|
||
/** | ||
* Add an extension to the source tree of QuantLab. | ||
* It takes as an argument either a path to a directory | ||
* on the local filesystem or a URL to a git repository. | ||
* In the former case, it copies the directory into the | ||
* source tree, in the latter it adds the repository as | ||
* a git submodule. | ||
* | ||
* It also adds the relevant metadata to the build files. | ||
*/ | ||
|
||
// Make sure we have required command line arguments. | ||
if (process.argv.length < 3) { | ||
let msg = '** Must supply a target extension'; | ||
process.stderr.write(msg); | ||
process.exit(1); | ||
} | ||
|
||
// Extract the desired git repository and repository name. | ||
let target = process.argv[2]; | ||
let basePath = path.resolve('.'); | ||
let packageDirName = path.basename(target); | ||
|
||
let packagePath = path.resolve(target); | ||
if (fs.existsSync(packagePath)) { | ||
// Copy the package directory contents to the sibling package. | ||
let newPackagePath = path.join(basePath, 'packages', packageDirName); | ||
fs.copySync(packagePath, newPackagePath); | ||
} else { | ||
// Otherwise treat it as a git reposotory and try to add it. | ||
packageDirName = target.split('/').pop().split('.')[0]; | ||
let packagePath = path.join(basePath, 'packages', packageDirName); | ||
utils.run('git clone ' + target + ' ' + packagePath); | ||
} | ||
|
||
// Remove any existing node_modules in the extension. | ||
if (fs.existsSync(path.join(packagePath, 'node_modules'))) { | ||
fs.removeSync(path.join(packagePath, 'node_modules')); | ||
} | ||
|
||
// Get the package.json of the extension. | ||
let data = utils.readJSONFile(path.join(packagePath, 'package.json')); | ||
|
||
// Add the extension path to packages/metapackage/tsconfig.json | ||
let tsconfigPath = path.join(basePath, 'packages', 'metapackage', 'tsconfig.json'); | ||
let tsconfig = utils.readJSONFile(tsconfigPath); | ||
tsconfig.compilerOptions.paths[data.name] = [path.join('..', packageDirName, 'src')]; | ||
fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2) + '\n'); | ||
|
||
// Update the core quantlab build dependencies. | ||
try { | ||
utils.run('qlpm run integrity'); | ||
} catch (e) { | ||
if (!process.env.TRAVIS_BRANCH) { | ||
console.error(e); | ||
process.exit(1); | ||
} | ||
} |
Oops, something went wrong.