Skip to content

Commit f8fa3b2

Browse files
committed
Remove 'lib' output folder, since it can't avoid an 'src' sub folder
1 parent 50a0c8d commit f8fa3b2

File tree

10 files changed

+161
-146
lines changed

10 files changed

+161
-146
lines changed

.gitignore

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,30 @@ npm-debug.log*
55
config.ts
66

77
# Ignore output of typescript compilation. They WILL be included in the package since .npmignore is empty
8-
*.js
9-
*.js.map
10-
*.d.ts
8+
index.js.map
9+
index.d.ts
1110

12-
# Ignore generated output
13-
lib/
11+
/src/**/*.js
12+
/src/**/*.js.map
13+
/src/**/*.d.ts
1414

15-
# Ignore generated typings
15+
# Ignore testing code TS compilation output
16+
/e2e/**/*.js
17+
/e2e/**/*.js.map
18+
/e2e/**/*.d.ts
19+
20+
/samples/**/*.js
21+
/samples/**/*.js.map
22+
/samples/**/*.d.ts
23+
24+
# Ignore generated typings
1625
typings/
1726

18-
# Exclude root folder *.js files and
27+
# Exclude root folder *.js files and except the generated index.js
1928
!/*.js
29+
index.js
2030

21-
# Exclude important config files
31+
# Exclude important config files (part of the samples)
2232
!systemjs.config.js
2333
!webpack.config.js
2434

.npmignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
# Include everything that's not part of the distributable package
1+
# Include everything that's not part of the distributable package
22
**/*
33

4-
# Exclude tsc destination folder
5-
!lib/**/*
4+
# Exclude tsc output that needs to be part of the released package
5+
!src/**/*.js
6+
!src/**/*.js.map
7+
!src/**/*.d.ts
8+
9+
!index.js
10+
!index.js.map
11+
!index.d.ts
12+
613
!package.json
714

karma-test-shim.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing.
77

88
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
99

10-
var builtPath = '/base/lib/';
10+
var builtPath = '/base/';
1111

1212
__karma__.loaded = function () { };
1313

@@ -46,7 +46,7 @@ System.config({
4646
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
4747
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
4848
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
49-
'cloudinary-core': 'npm:cloudinary-core/cloudinary-core-shrinkwrap.js'
49+
'cloudinary-core': 'npm:cloudinary-core/cloudinary-core-shrinkwrap.js'
5050
},
5151
});
5252

karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// #docregion
22
module.exports = function (config) {
33

4-
var appBase = 'lib/src'; // transpiled app JS and map files
4+
var appBase = 'src'; // transpiled app JS and map files
55
var appSrcBase = 'src/'; // app source TS files
66
var appAssets = 'none'; // component assets fetched by Angular's compiler
77

8-
var testBase = 'lib/src/'; // transpiled test JS and map files
8+
var testBase = 'src/'; // transpiled test JS and map files
99
var testSrcBase = 'src/'; // test source TS files
1010

1111
config.set({

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"sdk",
1616
"performance"
1717
],
18-
"main": "./lib/index.js",
19-
"types": "./lib/index.ts",
18+
"main": "index.js",
19+
"types": "index.ts",
2020
"scripts": {
2121
"lint": "tslint **/*.ts -t verbose --exclude=**/*.d.ts",
2222
"test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",

protractor.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports.config = {
2727
framework: 'jasmine',
2828

2929
// Spec patterns are relative to this config file
30-
specs: ['lib/e2e/**/*e2e-spec.js'],
30+
specs: ['e2e/**/*e2e-spec.js'],
3131

3232
allScriptsTimeout: 60000,
3333
getPageTimeout: 60000,

samples/photo_album/webpack.config.js

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@ const path = require('path');
44
const IS_PROD = process.argv.indexOf('-p') > -1;
55

66
module.exports = {
7-
devtool: IS_PROD ? 'source-map' : 'eval',
8-
entry: path.resolve(__dirname, 'app/js/main.ts'),
9-
output: {
10-
filename: 'bundle.js',
11-
path: IS_PROD ? './demo' : ''
12-
},
13-
module: {
14-
preLoaders: [{
15-
test: /\.ts$/, loader: 'tslint?emitErrors=false&failOnHint=false', exclude: /node_modules/
16-
}],
17-
loaders: [
18-
{
19-
test: /\.ts$/,
20-
loaders: ['awesome-typescript-loader', 'angular2-template-loader'],
21-
exclude: /node_modules/
22-
},
23-
{
24-
test: /\.html$|\.css$/,
25-
loader: 'raw-loader'
26-
}
27-
]
28-
},
29-
resolve: {
30-
extensions: ['', '.ts', '.js'],
31-
modules: [path.join(__dirname, "node_modules")]
32-
},
33-
devServer: {
34-
port: 8002,
35-
inline: true,
36-
hot: true,
37-
historyApiFallback: true,
38-
contentBase: 'app'
39-
},
40-
plugins: [
41-
new webpack.HotModuleReplacementPlugin(),
42-
new webpack.optimize.DedupePlugin(),
43-
new webpack.DefinePlugin({
44-
ENV: JSON.stringify(IS_PROD ? 'production' : 'development')
45-
}),
46-
new ExtractTextPlugin('stylesheets/[name].css')
7+
devtool: IS_PROD ? 'source-map' : 'eval',
8+
entry: path.resolve(__dirname, 'app/js/main.ts'),
9+
output: {
10+
filename: 'bundle.js',
11+
path: IS_PROD ? './demo' : ''
12+
},
13+
module: {
14+
preLoaders: [{
15+
test: /\.ts$/, loader: 'tslint?emitErrors=false&failOnHint=false', exclude: /node_modules/
16+
}],
17+
loaders: [
18+
{
19+
test: /\.ts$/,
20+
loaders: ['awesome-typescript-loader', 'angular2-template-loader'],
21+
exclude: /node_modules/
22+
},
23+
{
24+
test: /\.html$|\.css$/,
25+
loader: 'raw-loader'
26+
}
4727
]
28+
},
29+
resolve: {
30+
extensions: ['', '.ts', '.js'],
31+
modules: [path.join(__dirname, "node_modules")]
32+
},
33+
devServer: {
34+
port: 8002,
35+
inline: true,
36+
hot: true,
37+
historyApiFallback: true,
38+
contentBase: 'app'
39+
},
40+
plugins: [
41+
new webpack.HotModuleReplacementPlugin(),
42+
new webpack.optimize.DedupePlugin(),
43+
new webpack.DefinePlugin({
44+
ENV: JSON.stringify(IS_PROD ? 'production' : 'development')
45+
}),
46+
new ExtractTextPlugin('stylesheets/[name].css')
47+
]
4848
};

samples/photo_album_with_jquery/app/systemjs.config.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,53 @@
22
* System configuration for Angular2 Cloudinary sample
33
*/
44
(function (global) {
5-
System.config({
6-
paths: {
7-
// paths serve as alias
8-
'npm:': '../node_modules/'
9-
},
10-
// map tells the System loader where to look for things
11-
map: {
12-
// our app is within the app folder
13-
app: 'app',
14-
// Cloudinary lib
15-
'@cloudinary/angular': 'npm:@cloudinary/angular',
16-
'cloudinary-jquery-file-upload': 'npm:cloudinary-jquery-file-upload',
17-
// angular bundles
18-
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
19-
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
20-
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
21-
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
22-
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
23-
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
24-
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
25-
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
26-
// other libraries
27-
'rxjs': 'npm:rxjs',
28-
'jquery': 'npm:jquery/dist/jquery.js',
29-
'jquery.ui.widget': 'npm:blueimp-file-upload/js/vendor/jquery.ui.widget.js',
30-
'jquery-ui/widget': 'npm:blueimp-file-upload/js/vendor/jquery.ui.widget.js',
31-
'jquery-ui/ui/widget': 'npm:blueimp-file-upload/js/vendor/jquery.ui.widget.js',
32-
'jquery.iframe-transport': 'npm:blueimp-file-upload/js/jquery.iframe-transport.js',
33-
'jquery.fileupload': 'npm:blueimp-file-upload/js/jquery.fileupload.js'
34-
},
35-
// packages tells the System loader how to load when no filename and/or no extension
36-
packages: {
37-
app: {
38-
main: './main.js',
39-
defaultExtension: 'js'
40-
},
41-
rxjs: {
42-
defaultExtension: 'js'
43-
},
44-
"@cloudinary/angular": {
45-
main: 'lib/index.js',
46-
defaultExtension: 'js'
47-
},
48-
"cloudinary-jquery-file-upload": {
49-
main: 'cloudinary-jquery-file-upload.js',
50-
defaultExtension: 'js'
51-
}
52-
}
53-
});
5+
System.config({
6+
paths: {
7+
// paths serve as alias
8+
'npm:': '../node_modules/'
9+
},
10+
// map tells the System loader where to look for things
11+
map: {
12+
// our app is within the app folder
13+
app: 'app',
14+
// Cloudinary lib
15+
'@cloudinary/angular': 'npm:@cloudinary/angular',
16+
'cloudinary-jquery-file-upload': 'npm:cloudinary-jquery-file-upload',
17+
// angular bundles
18+
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
19+
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
20+
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
21+
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
22+
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
23+
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
24+
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
25+
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
26+
// other libraries
27+
'rxjs': 'npm:rxjs',
28+
'jquery': 'npm:jquery/dist/jquery.js',
29+
'jquery.ui.widget': 'npm:blueimp-file-upload/js/vendor/jquery.ui.widget.js',
30+
'jquery-ui/widget': 'npm:blueimp-file-upload/js/vendor/jquery.ui.widget.js',
31+
'jquery-ui/ui/widget': 'npm:blueimp-file-upload/js/vendor/jquery.ui.widget.js',
32+
'jquery.iframe-transport': 'npm:blueimp-file-upload/js/jquery.iframe-transport.js',
33+
'jquery.fileupload': 'npm:blueimp-file-upload/js/jquery.fileupload.js'
34+
},
35+
// packages tells the System loader how to load when no filename and/or no extension
36+
packages: {
37+
app: {
38+
main: './main.js',
39+
defaultExtension: 'js'
40+
},
41+
rxjs: {
42+
defaultExtension: 'js'
43+
},
44+
"@cloudinary/angular": {
45+
main: 'index.js',
46+
defaultExtension: 'js'
47+
},
48+
"cloudinary-jquery-file-upload": {
49+
main: 'cloudinary-jquery-file-upload.js',
50+
defaultExtension: 'js'
51+
}
52+
}
53+
});
5454
})(this);

systemjs.config.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@
22
* System configuration for Angular samples
33
* Adjust as necessary for your application needs.
44
*/
5-
(function(global) {
6-
System.config({
7-
paths: {
8-
// paths serve as alias
9-
'npm:': 'node_modules/'
10-
},
11-
// map tells the System loader where to look for things
12-
map: {
13-
// our app is within the app folder
14-
app: 'lib',
5+
(function (global) {
6+
System.config({
7+
paths: {
8+
// paths serve as alias
9+
'npm:': 'node_modules/'
10+
},
11+
// map tells the System loader where to look for things
12+
map: {
13+
// our app is within the app folder
14+
app: 'src',
1515

16-
// angular bundles
17-
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
18-
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
19-
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
20-
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
21-
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
22-
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
23-
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
24-
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
25-
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
16+
// angular bundles
17+
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
18+
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
19+
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
20+
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
21+
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
22+
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
23+
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
24+
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
25+
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
2626

27-
// other libraries
28-
'rxjs': 'npm:rxjs',
29-
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js'
30-
},
31-
// packages tells the System loader how to load when no filename and/or no extension
32-
packages: {
33-
app: {
34-
main: './index.js',
35-
defaultExtension: 'js'
36-
},
37-
rxjs: {
38-
defaultExtension: 'js'
39-
}
40-
}
41-
});
27+
// other libraries
28+
'rxjs': 'npm:rxjs',
29+
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js'
30+
},
31+
// packages tells the System loader how to load when no filename and/or no extension
32+
packages: {
33+
app: {
34+
main: './index.js',
35+
defaultExtension: 'js'
36+
},
37+
rxjs: {
38+
defaultExtension: 'js'
39+
}
40+
}
41+
});
4242
})(this);

tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
"noUnusedParameters": true,
1111
"noUnusedLocals": true,
1212
"declaration": true,
13-
"outDir": "./lib",
1413
"lib": [
1514
"es2015",
1615
"dom"
1716
]
1817
},
1918
"exclude": [
2019
"node_modules",
21-
"samples",
22-
"lib"
20+
"samples"
2321
]
24-
}
22+
}

0 commit comments

Comments
 (0)