Skip to content

Commit

Permalink
merging ...
Browse files Browse the repository at this point in the history
  • Loading branch information
quantlab committed Dec 5, 2017
1 parent 640d268 commit 79d56d5
Show file tree
Hide file tree
Showing 345 changed files with 160,174 additions and 7,506 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quantlab/yarn.js binary
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ MANIFEST
build
dist
lib
quantlab/build
quantlab/static
quantlab/schemas
quantlab/themes
quantlab/geckodriver
dev_mode/schemas
dev_mode/themes

node_modules
.cache
Expand All @@ -30,3 +33,5 @@ packages/services/examples/node/config.json
examples/app/build
examples/app/themes
examples/app/schemas

lerna-debug.log
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .yarnrc
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"
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ questions about these issues.
For general documentation about contributing to Jupyter projects, see the
[Project Jupyter Contributor Documentation](https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html).

All source code is written in [TypeScript](http://www.typescriptlang.org/Handbook). See the [Style Guide](https://github.com/jupyterlab/jupyterlab/wiki/TypeScript-Style-Guide).


## Setting Up a Development Environment

Expand Down
18 changes: 0 additions & 18 deletions MANIFEST.in

This file was deleted.

49 changes: 0 additions & 49 deletions appveyor.yml

This file was deleted.

50 changes: 50 additions & 0 deletions buildutils/package.json
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"
}
}
67 changes: 67 additions & 0 deletions buildutils/src/add-sibling.ts
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);
}
}
Loading

0 comments on commit 79d56d5

Please sign in to comment.