parent
47a3b4d56b
commit
6cfc6f5bb2
|
@ -60,6 +60,7 @@ addons:
|
|||
firefox: "38.0"
|
||||
|
||||
before_install:
|
||||
- npm install -g npm@3.5.2
|
||||
- node tools/analytics/build-analytics start ci job
|
||||
- node tools/analytics/build-analytics start ci before_install
|
||||
- echo ${TSDRC} > .tsdrc
|
||||
|
@ -77,7 +78,9 @@ install:
|
|||
# Check the size of caches
|
||||
- du -sh ./node_modules || true
|
||||
# Install npm dependecies
|
||||
- npm install
|
||||
# check-node-modules will exit(1) if we don't need to install
|
||||
# we need to manually kick off the postinstall script if check-node-modules exit(0)s
|
||||
- node tools/npm/check-node-modules --purge && npm install || npm run postinstall
|
||||
- node tools/analytics/build-analytics success ci install
|
||||
|
||||
before_script:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// THIS CHECK SHOULD BE THE FIRST THING IN THIS FILE
|
||||
// This is to ensure that we catch env issues before we error while requiring other dependencies.
|
||||
require('./tools/check-environment')(
|
||||
{requiredNpmVersion: '>=2.14.7 <3.0.0', requiredNodeVersion: '>=4.2.1 <5.0.0'});
|
||||
{requiredNpmVersion: '>=3.5.2 <4.0.0', requiredNodeVersion: '>=4.2.1 <5.0.0'});
|
||||
|
||||
|
||||
var del = require('del');
|
||||
|
@ -327,7 +327,9 @@ gulp.task('lint', ['build.tools'], function() {
|
|||
"requireParameterType": true,
|
||||
"requireReturnType": true,
|
||||
"semicolon": true,
|
||||
"variable-name": [true, "ban-keywords"]
|
||||
|
||||
// TODO: find a way to just screen for reserved names
|
||||
"variable-name": false
|
||||
}
|
||||
};
|
||||
return gulp.src(['modules/angular2/src/**/*.ts', '!modules/angular2/src/testing/**'])
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -26,8 +26,8 @@
|
|||
"url": "https://github.com/angular/angular.git"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "node tools/analytics/build-analytics start install npm-install && node tools/analytics/build-analytics start install npm-preinstall && node tools/npm/check-node-modules --purge && node tools/analytics/build-analytics success install npm-preinstall && node tools/analytics/build-analytics start install npm-install-net",
|
||||
"postinstall": "node tools/analytics/build-analytics success install npm-install-net && node tools/analytics/build-analytics start install npm-postinstall && node tools/npm/copy-npm-shrinkwrap && node tools/chromedriverpatch.js && webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --overwrite --clean --config modules/angular2/tsd.json && tsd reinstall --overwrite --clean --config tools/tsd.json && tsd reinstall --overwrite --config modules/angular1_router/tsd.json && node tools/analytics/build-analytics success install npm-postinstall && node tools/analytics/build-analytics success install npm-install",
|
||||
"preinstall": "node tools/analytics/build-analytics start install npm3-install && node tools/analytics/build-analytics start install npm-preinstall && node tools/npm/check-node-modules && node tools/analytics/build-analytics success install npm-preinstall && node tools/analytics/build-analytics start install npm-install-net",
|
||||
"postinstall": "node tools/analytics/build-analytics success install npm-install-net && node tools/analytics/build-analytics start install npm-postinstall && node tools/npm/copy-npm-shrinkwrap && node tools/chromedriverpatch.js && webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --overwrite --clean --config modules/angular2/tsd.json && tsd reinstall --overwrite --clean --config tools/tsd.json && tsd reinstall --overwrite --config modules/angular1_router/tsd.json && node tools/analytics/build-analytics success install npm-postinstall && node tools/analytics/build-analytics success install npm3-install",
|
||||
"build": "gulp build.js",
|
||||
"test": "gulp test.all.js && gulp test.all.dart"
|
||||
},
|
||||
|
@ -115,7 +115,7 @@
|
|||
"through2": "^0.6.5",
|
||||
"ts2dart": "^0.7.19",
|
||||
"tsd": "^0.6.5-beta",
|
||||
"tslint": "^3.0.0-dev.1",
|
||||
"tslint": "^3.2.1",
|
||||
"typescript": "^1.7.3",
|
||||
"universal-analytics": "^0.3.9",
|
||||
"webpack": "^1.12.6",
|
||||
|
|
|
@ -40,9 +40,13 @@ switch (eventType) {
|
|||
fs.writeFileSync(startTimestampFilePath, Date.now(), 'utf-8');
|
||||
break;
|
||||
case 'success':
|
||||
var startTime = fs.readFileSync(startTimestampFilePath, 'utf-8');
|
||||
analytics[actionCategory + 'Success'](actionName, Date.now() - startTime);
|
||||
fs.unlinkSync(startTimestampFilePath);
|
||||
try {
|
||||
var startTime = fs.readFileSync(startTimestampFilePath, 'utf-8');
|
||||
analytics[actionCategory + 'Success'](actionName, Date.now() - startTime);
|
||||
fs.unlinkSync(startTimestampFilePath);
|
||||
} catch(e) {
|
||||
console.log('No start timestamp file "' + startTimestampFilePath + '" found, skipping analytics.');
|
||||
}
|
||||
break;
|
||||
case 'error':
|
||||
var startTime = fs.readFileSync(startTimestampFilePath, 'utf-8');
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
var checkNpm = require('./check-node-modules.js');
|
||||
|
||||
var purgeIfStale = (process.argv.indexOf('--purge') !== -1)
|
||||
var purgeIfStale = (process.argv.indexOf('--purge') !== -1);
|
||||
|
||||
// check-node-modules will exit(1) if we don't need to install to short-circuit `npm install`
|
||||
// see .travis.yml's `install` block to see the reason for this
|
||||
process.exit(checkNpm(true, purgeIfStale) ? 1 : 0);
|
||||
|
||||
checkNpm(true, purgeIfStale);
|
||||
|
|
|
@ -4,7 +4,7 @@ var fs = require('fs');
|
|||
var path = require('path');
|
||||
|
||||
var NPM_SHRINKWRAP_FILE = 'npm-shrinkwrap.json';
|
||||
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/npm-shrinkwrap.cached.json';
|
||||
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/.npm-shrinkwrap.cached.json';
|
||||
var FS_OPTS = {encoding: 'utf-8'};
|
||||
var PROJECT_ROOT = path.join(__dirname, '../../');
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ var fse = require('fs-extra');
|
|||
var path = require('path');
|
||||
|
||||
var NPM_SHRINKWRAP_FILE = 'npm-shrinkwrap.json';
|
||||
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/npm-shrinkwrap.cached.json';
|
||||
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/.npm-shrinkwrap.cached.json';
|
||||
var PROJECT_ROOT = path.join(__dirname, '../../');
|
||||
|
||||
process.chdir(PROJECT_ROOT);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {RuleFailure} from 'tslint/lib/lint';
|
||||
import {AbstractRule} from 'tslint/lib/rules';
|
||||
import {RuleWalker} from 'tslint/lib/language/walker';
|
||||
import * as ts from 'tslint/node_modules/typescript';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
export class Rule extends AbstractRule {
|
||||
public apply(sourceFile: ts.SourceFile): RuleFailure[] {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {RuleFailure} from 'tslint/lib/lint';
|
||||
import {AbstractRule} from 'tslint/lib/rules';
|
||||
import {RuleWalker} from 'tslint/lib/language/walker';
|
||||
import * as ts from 'tslint/node_modules/typescript';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
export class Rule extends AbstractRule {
|
||||
public static FAILURE_STRING = "missing type declaration";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {RuleFailure} from 'tslint/lib/lint';
|
||||
import {AbstractRule} from 'tslint/lib/rules';
|
||||
import {RuleWalker} from 'tslint/lib/language/walker';
|
||||
import * as ts from 'tslint/node_modules/typescript';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
export class Rule extends AbstractRule {
|
||||
public static FAILURE_STRING = "missing type declaration";
|
||||
|
|
Loading…
Reference in New Issue