chore(build): rename ionic directory to src and update all references in the build process.

This commit is contained in:
Josh Thomas
2016-05-19 13:20:59 -05:00
parent 8470ae04ac
commit c8f760f080
595 changed files with 73 additions and 87 deletions

View File

@ -3,11 +3,11 @@
# See config at https://github.com/brigade/scss-lint/blob/master/config/default.yml # See config at https://github.com/brigade/scss-lint/blob/master/config/default.yml
exclude: exclude:
- 'ionic/components/slides/**' - 'src/components/slides/**'
- 'ionic/components/show-hide-when/**' - 'src/components/show-hide-when/**'
- 'ionic/components.*.scss' - 'src/components.*.scss'
- 'ionic/util/*.scss' - 'src/util/*.scss'
- 'ionic/platform/cordova.*.scss' - 'src/platform/cordova.*.scss'
linters: linters:

View File

@ -1 +1 @@
@import "../ionic/ionic.ios"; @import "../src/ionic.ios";

View File

@ -1 +1 @@
@import "../ionic/ionic.md"; @import "../src/ionic.md";

View File

@ -33,4 +33,4 @@ $colors: (
bright: #FFC125 bright: #FFC125
); );
@import "../ionic/ionic.ios"; @import "../src/ionic.ios";

View File

@ -33,4 +33,4 @@ $colors: (
bright: #FFC125 bright: #FFC125
); );
@import "../ionic/ionic.md"; @import "../src/ionic.md";

View File

@ -86,9 +86,9 @@ gulp.task('watch', ['build'], function() {
function watchTask(task){ function watchTask(task){
watch([ watch([
'ionic/**/*.ts', 'src/**/*.ts',
'!ionic/components/*/test/**/*', '!src/components/*/test/**/*',
'!ionic/util/test/*' '!src/util/test/*'
], ],
function(file) { function(file) {
if (file.event === "unlink") { if (file.event === "unlink") {
@ -99,7 +99,7 @@ function watchTask(task){
} }
); );
watch('ionic/**/*.scss', function() { watch('src/**/*.scss', function() {
gulp.start('sass'); gulp.start('sass');
}); });
@ -201,7 +201,7 @@ gulp.task('bundle.system', function(){
var tsResult = tsCompile(getTscOptions('es6'), 'system') var tsResult = tsCompile(getTscOptions('es6'), 'system')
.pipe(babel(babelOptions)); .pipe(babel(babelOptions));
var swiper = gulp.src('ionic/components/slides/swiper-widget.system.js'); var swiper = gulp.src('src/components/slides/swiper-widget.system.js');
return merge([tsResult, swiper]) return merge([tsResult, swiper])
.pipe(remember('system')) .pipe(remember('system'))
@ -246,13 +246,13 @@ gulp.task('transpile', function(){
function tsCompile(options, cacheName){ function tsCompile(options, cacheName){
return gulp.src([ return gulp.src([
'typings/main.d.ts', 'typings/main.d.ts',
'ionic/**/*.ts', 'src/**/*.ts',
'!ionic/**/*.d.ts', '!src/**/*.d.ts',
'!ionic/components/*/test/**/*', '!src/components/*/test/**/*',
'!ionic/util/test/*', '!src/util/test/*',
'!ionic/config/test/*', '!src/config/test/*',
'!ionic/platform/test/*', '!src/platform/test/*',
'!ionic/**/*.spec.ts' '!src/**/*.spec.ts'
]) ])
.pipe(cache(cacheName, { optimizeMemory: true })) .pipe(cache(cacheName, { optimizeMemory: true }))
.pipe(tsc(options, undefined, tscReporter)); .pipe(tsc(options, undefined, tscReporter));
@ -267,10 +267,10 @@ gulp.task('sass', function() {
var minifyCss = require('gulp-minify-css'); var minifyCss = require('gulp-minify-css');
gulp.src([ gulp.src([
'ionic/ionic.ios.scss', 'src/ionic.ios.scss',
'ionic/ionic.md.scss', 'src/ionic.md.scss',
'ionic/ionic.wp.scss', 'src/ionic.wp.scss',
'ionic/ionic.scss' 'src/ionic.scss'
]) ])
.pipe(sass({ .pipe(sass({
includePaths: [__dirname + '/node_modules/ionicons/dist/scss/'], includePaths: [__dirname + '/node_modules/ionicons/dist/scss/'],
@ -312,7 +312,7 @@ gulp.task('sass.themes', function() {
*/ */
gulp.task('fonts', function() { gulp.task('fonts', function() {
gulp.src([ gulp.src([
'ionic/fonts/*.+(ttf|woff|woff2)', 'src/fonts/*.+(ttf|woff|woff2)',
'node_modules/ionicons/dist/fonts/*.+(ttf|woff|woff2)' 'node_modules/ionicons/dist/fonts/*.+(ttf|woff|woff2)'
]) ])
.pipe(gulp.dest('dist/fonts')); .pipe(gulp.dest('dist/fonts'));
@ -323,9 +323,9 @@ gulp.task('fonts', function() {
*/ */
gulp.task('copy.scss', function() { gulp.task('copy.scss', function() {
return gulp.src([ return gulp.src([
'ionic/**/*.scss', 'src/**/*.scss',
'!ionic/components/*/test/**/*', '!src/components/*/test/**/*',
'!ionic/util/test/*' '!src/util/test/*'
]) ])
.pipe(gulp.dest('dist')); .pipe(gulp.dest('dist'));
}); });
@ -337,9 +337,9 @@ gulp.task('lint.scss', function() {
var scsslint = require('gulp-scss-lint'); var scsslint = require('gulp-scss-lint');
return gulp.src([ return gulp.src([
'ionic/**/*.scss', 'src/**/*.scss',
'!ionic/components/*/test/**/*', '!src/components/*/test/**/*',
'!ionic/util/test/*' '!src/util/test/*'
]) ])
.pipe(scsslint()) .pipe(scsslint())
.pipe(scsslint.failReporter()); .pipe(scsslint.failReporter());
@ -363,8 +363,8 @@ gulp.task('copy.libs', function() {
// for swiper-widget // for swiper-widget
var libs = gulp.src([ var libs = gulp.src([
'ionic/**/*.js', 'src/**/*.js',
'ionic/**/*.d.ts' 'src/**/*.d.ts'
]) ])
.pipe(gulp.dest('dist')); .pipe(gulp.dest('dist'));
@ -383,7 +383,7 @@ gulp.task('copy.libs', function() {
gulp.task('watch.e2e', ['e2e'], function() { gulp.task('watch.e2e', ['e2e'], function() {
watchTask('bundle.system'); watchTask('bundle.system');
watch('ionic/components/*/test/**/*', function(file) { watch('src/components/*/test/**/*', function(file) {
gulp.start('e2e.build'); gulp.start('e2e.build');
}); });
}); });
@ -419,8 +419,8 @@ gulp.task('e2e.build', function() {
// Get each test folder with gulp.src // Get each test folder with gulp.src
var tsResult = gulp.src([ var tsResult = gulp.src([
'ionic/components/*/test/*/**/*.ts', 'src/components/*/test/*/**/*.ts',
'!ionic/components/*/test/*/**/*.spec.ts' '!src/components/*/test/*/**/*.spec.ts'
]) ])
.pipe(cache('e2e.ts')) .pipe(cache('e2e.ts'))
.pipe(tsc(getTscOptions(), undefined, tscReporter)) .pipe(tsc(getTscOptions(), undefined, tscReporter))
@ -431,8 +431,8 @@ gulp.task('e2e.build', function() {
.pipe(gulpif(/e2e.js$/, createPlatformTests())) .pipe(gulpif(/e2e.js$/, createPlatformTests()))
var testFiles = gulp.src([ var testFiles = gulp.src([
'ionic/components/*/test/*/**/*', 'src/components/*/test/*/**/*',
'!ionic/components/*/test/*/**/*.ts' '!src/components/*/test/*/**/*.ts'
]) ])
.pipe(cache('e2e.files')) .pipe(cache('e2e.files'))
@ -461,7 +461,7 @@ gulp.task('e2e.build', function() {
function createPlatformTests(file) { function createPlatformTests(file) {
return through2.obj(function(file, enc, next) { return through2.obj(function(file, enc, next) {
var self = this; var self = this;
var relativePath = path.dirname(file.path.replace(/^.*?ionic(\/|\\)components(\/|\\)/, '')); var relativePath = path.dirname(file.path.replace(/^.*?src(\/|\\)components(\/|\\)/, ''));
relativePath = relativePath.replace('/test/', '/'); relativePath = relativePath.replace('/test/', '/');
var contents = file.contents.toString(); var contents = file.contents.toString();
platforms.forEach(function(platform) { platforms.forEach(function(platform) {
@ -486,7 +486,7 @@ gulp.task('e2e.build', function() {
* Builds Ionic unit tests to dist/tests. * Builds Ionic unit tests to dist/tests.
*/ */
gulp.task('tests', function() { gulp.task('tests', function() {
return gulp.src('ionic/**/test/**/*.spec.ts') return gulp.src('src/**/test/**/*.spec.ts')
.pipe(cache('tests')) .pipe(cache('tests'))
.pipe(tsc(getTscOptions(), undefined, tscReporter)) .pipe(tsc(getTscOptions(), undefined, tscReporter))
.pipe(rename(function(file) { .pipe(rename(function(file) {
@ -497,7 +497,7 @@ gulp.task('tests', function() {
}); });
gulp.task('watch.tests', ['tests'], function(){ gulp.task('watch.tests', ['tests'], function(){
watch('ionic/**/test/**/*.spec.ts', function(){ watch('src/**/test/**/*.spec.ts', function(){
gulp.start('tests'); gulp.start('tests');
}); });
}); });
@ -983,8 +983,8 @@ gulp.task('validate', function(done) {
gulp.task('tslint', function() { gulp.task('tslint', function() {
var tslint = require('gulp-tslint'); var tslint = require('gulp-tslint');
return gulp.src([ return gulp.src([
'ionic/**/*.ts', 'src/**/*.ts',
'!ionic/**/test/**/*', '!src/**/test/**/*',
]).pipe(tslint()) ]).pipe(tslint())
.pipe(tslint.report('verbose')); .pipe(tslint.report('verbose'));
}); });

View File

@ -2,13 +2,13 @@
module.exports = { module.exports = {
dist: 'dist', dist: 'dist',
src: { src: {
spec: ['ionic/**/test/*.spec.js'], spec: ['src/**/test/*.spec.js'],
js: ['ionic/**/*.js'], js: ['src/**/*.js'],
// Get all the non-js files and main.js // Get all the non-js files and main.js
e2e: ['ionic/components/*/test/*/**/*'], e2e: ['src/components/*/test/*/**/*'],
html: 'ionic/**/*.html', html: 'src/**/*.html',
scss: 'ionic/**/*.scss', scss: 'src/**/*.scss',
}, },
scripts: [ scripts: [

View File

@ -18,19 +18,5 @@
</ion-app> </ion-app>
<script src="bundle.js"></script> <script src="bundle.js"></script>
<!-- <script src="../../js/ionic.bundle.js"></script>
<script>
System.config({
"paths": {
"*": "*.js",
"ionic/*": "ionic/*",
"angular2/*": "angular2/*",
"rx": "rx"
}
})
System.import("index");
</script> -->
</body> </body>
</html> </html>

View File

@ -94,13 +94,13 @@ module.exports = function(currentVersion) {
docTypes: ['class', 'var', 'function', 'let'], docTypes: ['class', 'var', 'function', 'let'],
getOutputPath: function(doc) { getOutputPath: function(doc) {
// strip ionic from path root // strip ionic from path root
var docPath = doc.fileInfo.relativePath.replace(/^ionic\//, ''); var docPath = doc.fileInfo.relativePath.replace(/^src\//, '');
// remove filename since we have multiple docTypes per file // remove filename since we have multiple docTypes per file
docPath = docPath.substring(0, docPath.lastIndexOf('/') + 1); docPath = docPath.substring(0, docPath.lastIndexOf('/') + 1);
docPath += doc.name + '/index.md'; docPath += doc.name + '/index.md';
var path = config.v2DocsDir + '/' + (versionData.current.folder || '') + var path = config.v2DocsDir + '/' + (versionData.current.folder || '') +
'/api/' + docPath; '/api/' + docPath;
path = path.replace('/home/ubuntu/ionic/ionic', '') path = path.replace('/home/ubuntu/ionic/src', '')
return path; return path;
} }
}]; }];
@ -115,7 +115,7 @@ module.exports = function(currentVersion) {
readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname, '../..')); readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname, '../..'));
readTypeScriptModules.sourceFiles = [ readTypeScriptModules.sourceFiles = [
'ionic/index.ts' 'src/index.ts'
]; ];
}) })

View File

@ -55,7 +55,7 @@ module.exports = function(gulp, flags) {
}); });
} }
return gulp.src('ionic/**/*.scss') return gulp.src('src/**/*.scss')
.pipe(es.map(function(file, callback) { .pipe(es.map(function(file, callback) {
var contents = file.contents.toString(); var contents = file.contents.toString();
var variableLine, variableName, defaultValue, multiline; var variableLine, variableName, defaultValue, multiline;

View File

@ -19,7 +19,7 @@ module.exports = function jekyll(renderDocsProcessor) {
docs.forEach(function(doc, i) { docs.forEach(function(doc, i) {
docs[i].URL = doc.outputPath.replace('docs/v2//','docs/v2/') docs[i].URL = doc.outputPath.replace('docs/v2//','docs/v2/')
.replace('/index.md','') .replace('/index.md','')
.replace('//home/ubuntu/ionic/ionic', '') .replace('//home/ubuntu/ionic/src', '')
.replace('//', '/'); .replace('//', '/');
if (docs[i].relativePath) { if (docs[i].relativePath) {
docs[i].relativePath = doc.relativePath docs[i].relativePath = doc.relativePath

View File

@ -1,6 +1,6 @@
// For E2E dark theme tests // For E2E dark theme tests
@import "../../ionic/themes/dark.ios.scss"; @import "../../src/themes/dark.ios.scss";
@import "../../ionic/ionic.ios.scss"; @import "../../src/ionic.ios.scss";

View File

@ -1,6 +1,6 @@
// For E2E dark theme tests // For E2E dark theme tests
@import "../../ionic/themes/dark.md.scss"; @import "../../src/themes/dark.md.scss";
@import "../../ionic/ionic.md.scss"; @import "../../src/ionic.md.scss";

View File

@ -1,6 +1,6 @@
// For E2E dark theme tests // For E2E dark theme tests
@import "../../ionic/themes/dark.wp.scss"; @import "../../src/themes/dark.wp.scss";
@import "../../ionic/ionic.wp.scss"; @import "../../src/ionic.wp.scss";

View File

@ -1,8 +1,8 @@
module.exports = { module.exports = {
externals: [ externals: [
{ {
'ionic/ionic': { 'src/ionic': {
commonjs2: 'ionic/ionic' commonjs2: 'src/ionic'
}, },
'@angular/core': { '@angular/core': {
commonjs2: ['angular2', 'core'] commonjs2: ['angular2', 'core']

View File

@ -25,7 +25,7 @@ module.exports = function(config) {
'scripts/karma/test-main.js' 'scripts/karma/test-main.js'
], ],
exclude: ['ionic/components/*/test/*/**/*'], exclude: ['src/components/*/test/*/**/*'],
logLevel: 'warn', logLevel: 'warn',

View File

@ -1,7 +1,7 @@
System.config({ System.config({
baseURL: '/base', baseURL: '/base',
map: { map: {
'ionic-angular': 'ionic', 'ionic-angular': 'src',
'@angular': 'node_modules/@angular', '@angular': 'node_modules/@angular',
}, },
packages: { packages: {

View File

@ -1,4 +1,4 @@
import { Alert, Loading, NavController, App, Page } from '../../../../../ionic/index'; import { Alert, Loading, NavController, App, Page } from '../../../../index';
import { FORM_DIRECTIVES, FormBuilder, ControlGroup, Validators } from '@angular/common'; import { FORM_DIRECTIVES, FormBuilder, ControlGroup, Validators } from '@angular/common';

Some files were not shown because too many files have changed in this diff Show More