Skip to content

Commit

Permalink
chore(build): rename ionic directory to src and update all references…
Browse files Browse the repository at this point in the history
… in the build process.
  • Loading branch information
jthoms1 committed May 19, 2016
1 parent 8470ae0 commit c8f760f
Show file tree
Hide file tree
Showing 595 changed files with 73 additions and 87 deletions.
10 changes: 5 additions & 5 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# See config at https://github.com/brigade/scss-lint/blob/master/config/default.yml

exclude:
- 'ionic/components/slides/**'
- 'ionic/components/show-hide-when/**'
- 'ionic/components.*.scss'
- 'ionic/util/*.scss'
- 'ionic/platform/cordova.*.scss'
- 'src/components/slides/**'
- 'src/components/show-hide-when/**'
- 'src/components.*.scss'
- 'src/util/*.scss'
- 'src/platform/cordova.*.scss'


linters:
Expand Down
2 changes: 1 addition & 1 deletion demos/app.ios.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "../ionic/ionic.ios";
@import "../src/ionic.ios";
2 changes: 1 addition & 1 deletion demos/app.md.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "../ionic/ionic.md";
@import "../src/ionic.md";
2 changes: 1 addition & 1 deletion demos/output.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ $colors: (
bright: #FFC125
);

@import "../ionic/ionic.ios";
@import "../src/ionic.ios";
2 changes: 1 addition & 1 deletion demos/output.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ $colors: (
bright: #FFC125
);

@import "../ionic/ionic.md";
@import "../src/ionic.md";
70 changes: 35 additions & 35 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ gulp.task('watch', ['build'], function() {

function watchTask(task){
watch([
'ionic/**/*.ts',
'!ionic/components/*/test/**/*',
'!ionic/util/test/*'
'src/**/*.ts',
'!src/components/*/test/**/*',
'!src/util/test/*'
],
function(file) {
if (file.event === "unlink") {
Expand All @@ -99,7 +99,7 @@ function watchTask(task){
}
);

watch('ionic/**/*.scss', function() {
watch('src/**/*.scss', function() {
gulp.start('sass');
});

Expand Down Expand Up @@ -201,7 +201,7 @@ gulp.task('bundle.system', function(){
var tsResult = tsCompile(getTscOptions('es6'), 'system')
.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])
.pipe(remember('system'))
Expand Down Expand Up @@ -246,13 +246,13 @@ gulp.task('transpile', function(){
function tsCompile(options, cacheName){
return gulp.src([
'typings/main.d.ts',
'ionic/**/*.ts',
'!ionic/**/*.d.ts',
'!ionic/components/*/test/**/*',
'!ionic/util/test/*',
'!ionic/config/test/*',
'!ionic/platform/test/*',
'!ionic/**/*.spec.ts'
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/components/*/test/**/*',
'!src/util/test/*',
'!src/config/test/*',
'!src/platform/test/*',
'!src/**/*.spec.ts'
])
.pipe(cache(cacheName, { optimizeMemory: true }))
.pipe(tsc(options, undefined, tscReporter));
Expand All @@ -267,10 +267,10 @@ gulp.task('sass', function() {
var minifyCss = require('gulp-minify-css');

gulp.src([
'ionic/ionic.ios.scss',
'ionic/ionic.md.scss',
'ionic/ionic.wp.scss',
'ionic/ionic.scss'
'src/ionic.ios.scss',
'src/ionic.md.scss',
'src/ionic.wp.scss',
'src/ionic.scss'
])
.pipe(sass({
includePaths: [__dirname + '/node_modules/ionicons/dist/scss/'],
Expand Down Expand Up @@ -312,7 +312,7 @@ gulp.task('sass.themes', function() {
*/
gulp.task('fonts', function() {
gulp.src([
'ionic/fonts/*.+(ttf|woff|woff2)',
'src/fonts/*.+(ttf|woff|woff2)',
'node_modules/ionicons/dist/fonts/*.+(ttf|woff|woff2)'
])
.pipe(gulp.dest('dist/fonts'));
Expand All @@ -323,9 +323,9 @@ gulp.task('fonts', function() {
*/
gulp.task('copy.scss', function() {
return gulp.src([
'ionic/**/*.scss',
'!ionic/components/*/test/**/*',
'!ionic/util/test/*'
'src/**/*.scss',
'!src/components/*/test/**/*',
'!src/util/test/*'
])
.pipe(gulp.dest('dist'));
});
Expand All @@ -337,9 +337,9 @@ gulp.task('lint.scss', function() {
var scsslint = require('gulp-scss-lint');

return gulp.src([
'ionic/**/*.scss',
'!ionic/components/*/test/**/*',
'!ionic/util/test/*'
'src/**/*.scss',
'!src/components/*/test/**/*',
'!src/util/test/*'
])
.pipe(scsslint())
.pipe(scsslint.failReporter());
Expand All @@ -363,8 +363,8 @@ gulp.task('copy.libs', function() {

// for swiper-widget
var libs = gulp.src([
'ionic/**/*.js',
'ionic/**/*.d.ts'
'src/**/*.js',
'src/**/*.d.ts'
])
.pipe(gulp.dest('dist'));

Expand All @@ -383,7 +383,7 @@ gulp.task('copy.libs', function() {
gulp.task('watch.e2e', ['e2e'], function() {
watchTask('bundle.system');

watch('ionic/components/*/test/**/*', function(file) {
watch('src/components/*/test/**/*', function(file) {
gulp.start('e2e.build');
});
});
Expand Down Expand Up @@ -419,8 +419,8 @@ gulp.task('e2e.build', function() {

// Get each test folder with gulp.src
var tsResult = gulp.src([
'ionic/components/*/test/*/**/*.ts',
'!ionic/components/*/test/*/**/*.spec.ts'
'src/components/*/test/*/**/*.ts',
'!src/components/*/test/*/**/*.spec.ts'
])
.pipe(cache('e2e.ts'))
.pipe(tsc(getTscOptions(), undefined, tscReporter))
Expand All @@ -431,8 +431,8 @@ gulp.task('e2e.build', function() {
.pipe(gulpif(/e2e.js$/, createPlatformTests()))

var testFiles = gulp.src([
'ionic/components/*/test/*/**/*',
'!ionic/components/*/test/*/**/*.ts'
'src/components/*/test/*/**/*',
'!src/components/*/test/*/**/*.ts'
])
.pipe(cache('e2e.files'))

Expand Down Expand Up @@ -461,7 +461,7 @@ gulp.task('e2e.build', function() {
function createPlatformTests(file) {
return through2.obj(function(file, enc, next) {
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/', '/');
var contents = file.contents.toString();
platforms.forEach(function(platform) {
Expand All @@ -486,7 +486,7 @@ gulp.task('e2e.build', function() {
* Builds Ionic unit tests to dist/tests.
*/
gulp.task('tests', function() {
return gulp.src('ionic/**/test/**/*.spec.ts')
return gulp.src('src/**/test/**/*.spec.ts')
.pipe(cache('tests'))
.pipe(tsc(getTscOptions(), undefined, tscReporter))
.pipe(rename(function(file) {
Expand All @@ -497,7 +497,7 @@ gulp.task('tests', function() {
});

gulp.task('watch.tests', ['tests'], function(){
watch('ionic/**/test/**/*.spec.ts', function(){
watch('src/**/test/**/*.spec.ts', function(){
gulp.start('tests');
});
});
Expand Down Expand Up @@ -983,8 +983,8 @@ gulp.task('validate', function(done) {
gulp.task('tslint', function() {
var tslint = require('gulp-tslint');
return gulp.src([
'ionic/**/*.ts',
'!ionic/**/test/**/*',
'src/**/*.ts',
'!src/**/test/**/*',
]).pipe(tslint())
.pipe(tslint.report('verbose'));
});
10 changes: 5 additions & 5 deletions scripts/build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
module.exports = {
dist: 'dist',
src: {
spec: ['ionic/**/test/*.spec.js'],
js: ['ionic/**/*.js'],
spec: ['src/**/test/*.spec.js'],
js: ['src/**/*.js'],

// Get all the non-js files and main.js
e2e: ['ionic/components/*/test/*/**/*'],
html: 'ionic/**/*.html',
scss: 'ionic/**/*.scss',
e2e: ['src/components/*/test/*/**/*'],
html: 'src/**/*.html',
scss: 'src/**/*.scss',
},

scripts: [
Expand Down
14 changes: 0 additions & 14 deletions scripts/demos/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,5 @@
</ion-app>

<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>
</html>
6 changes: 3 additions & 3 deletions scripts/docs/dgeni-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ module.exports = function(currentVersion) {
docTypes: ['class', 'var', 'function', 'let'],
getOutputPath: function(doc) {
// 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
docPath = docPath.substring(0, docPath.lastIndexOf('/') + 1);
docPath += doc.name + '/index.md';
var path = config.v2DocsDir + '/' + (versionData.current.folder || '') +
'/api/' + docPath;
path = path.replace('/home/ubuntu/ionic/ionic', '')
path = path.replace('/home/ubuntu/ionic/src', '')
return path;
}
}];
Expand All @@ -115,7 +115,7 @@ module.exports = function(currentVersion) {

readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname, '../..'));
readTypeScriptModules.sourceFiles = [
'ionic/index.ts'
'src/index.ts'
];
})

Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/gulp-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
var contents = file.contents.toString();
var variableLine, variableName, defaultValue, multiline;
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/processors/jekyll.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function jekyll(renderDocsProcessor) {
docs.forEach(function(doc, i) {
docs[i].URL = doc.outputPath.replace('docs/v2//','docs/v2/')
.replace('/index.md','')
.replace('//home/ubuntu/ionic/ionic', '')
.replace('//home/ubuntu/ionic/src', '')
.replace('//', '/');
if (docs[i].relativePath) {
docs[i].relativePath = doc.relativePath
Expand Down
4 changes: 2 additions & 2 deletions scripts/e2e/ionic.ios.dark.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// 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";
4 changes: 2 additions & 2 deletions scripts/e2e/ionic.md.dark.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// 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";
4 changes: 2 additions & 2 deletions scripts/e2e/ionic.wp.dark.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// 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";
4 changes: 2 additions & 2 deletions scripts/e2e/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
externals: [
{
'ionic/ionic': {
commonjs2: 'ionic/ionic'
'src/ionic': {
commonjs2: 'src/ionic'
},
'@angular/core': {
commonjs2: ['angular2', 'core']
Expand Down
2 changes: 1 addition & 1 deletion scripts/karma/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function(config) {
'scripts/karma/test-main.js'
],

exclude: ['ionic/components/*/test/*/**/*'],
exclude: ['src/components/*/test/*/**/*'],

logLevel: 'warn',

Expand Down
2 changes: 1 addition & 1 deletion scripts/karma/system.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
System.config({
baseURL: '/base',
map: {
'ionic-angular': 'ionic',
'ionic-angular': 'src',
'@angular': 'node_modules/@angular',
},
packages: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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';


Expand Down Expand Up @@ -161,4 +161,4 @@ class E2EApp {
constructor() {
this.root = E2EPage;
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {DateTime, Form, Picker, Config, NavController} from '../../../../ionic';
import * as datetime from '../../../../ionic/util/datetime-util';
import {DateTime, Form, Picker, Config, NavController} from '../../../../src';
import * as datetime from '../../../../src/util/datetime-util';

export function run() {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c8f760f

Please sign in to comment.