Skip to content

Commit

Permalink
- rename ldc.js, ldc.min.js to index.js and index.min.js
Browse files Browse the repository at this point in the history
 - upgrade modules
 - add `main` and `browser` field in `package.json`.
 - further minimize generated js file with mangling and compression
 - remove assets files from git
 - patch test code to make it work with upgraded modules
 - release with compact directory structure
 - bump version
  • Loading branch information
zbryikt committed Jan 24, 2022
1 parent 4a1865f commit 2c7cba4
Show file tree
Hide file tree
Showing 15 changed files with 6,678 additions and 788 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.*.swp
.swp
node_modules
web/static/assets/lib/
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# 0.0.2
# Change Logs

## v0.0.3

- rename `ldc.js`, `ldc.min.js` to `index.js` and `index.min.js`
- upgrade modules
- add `main` and `browser` field in `package.json`.
- further minimize generated js file with mangling and compression
- remove assets files from git
- patch test code to make it work with upgraded modules
- release with compact directory structure


## v0.0.2

- update module name to `@loadingio/ldc`
- upgrade dependencies
15 changes: 8 additions & 7 deletions build
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash

rm -rf dist
mkdir -p dist
echo "build src/ldc.ls -> dist/ldc.js ..."
./node_modules/.bin/lsc -cbp src/ldc.ls > dist/ldc.js
echo "minifying ldc.js ..."
./node_modules/.bin/uglifyjs dist/ldc.js > dist/ldc.min.js
echo "build src/index.ls -> dist/index.js ..."
./node_modules/.bin/lsc -cp --no-header src/index.ls > dist/index.js
echo "minifying index.js ..."
./node_modules/.bin/uglifyjs dist/index.js -c -m > dist/index.min.js
echo "deploy into local web ..."
mkdir -p web/static/assets/lib/ldc/
cp -R dist/* web/static/assets/lib/ldc/
mkdir -p web/static/assets/lib/@loadingio/ldc/
cp -R dist/* web/static/assets/lib/@loadingio/ldc/
echo "done."

30 changes: 20 additions & 10 deletions dist/ldc.js → dist/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Generated by LiveScript 1.3.1
var slice$ = [].slice;
(function(){
var local, lda, ldc;
local = {};
Expand All @@ -25,8 +23,12 @@ var slice$ = [].slice;
return ((ref$ = this.evtHandler)[n] || (ref$[n] = [])).push(cb);
},
fire: function(n){
var v, i$, ref$, len$, cb, results$ = [];
v = slice$.call(arguments, 1);
var v, res$, i$, to$, ref$, len$, cb, results$ = [];
res$ = [];
for (i$ = 1, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
v = res$;
for (i$ = 0, len$ = (ref$ = this.evtHandler[n] || []).length; i$ < len$; ++i$) {
cb = ref$[i$];
results$.push(cb.apply(this, v));
Expand All @@ -53,8 +55,12 @@ var slice$ = [].slice;
}
},
act: function(n){
var v, i$, ref$, len$, cb, results$ = [];
v = slice$.call(arguments, 1);
var v, res$, i$, to$, ref$, len$, cb, results$ = [];
res$ = [];
for (i$ = 1, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
v = res$;
for (i$ = 0, len$ = (ref$ = this.actHandler[n] || []).length; i$ < len$; ++i$) {
cb = ref$[i$];
results$.push(cb.apply(this, v));
Expand All @@ -63,8 +69,12 @@ var slice$ = [].slice;
},
apps: [],
app: function(){
var args;
args = slice$.call(arguments);
var args, res$, i$, to$;
res$ = [];
for (i$ = 0, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
args = res$;
return this.apps = this.apps.concat(args);
},
init: function(names){
Expand Down Expand Up @@ -107,7 +117,7 @@ var slice$ = [].slice;
return null;
}
};
return window.addEventListener('DOMContentLoaded', function(){
window.addEventListener('DOMContentLoaded', function(){
return ldc.init();
});
})();
}).call(this);
1 change: 1 addition & 0 deletions dist/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/ldc.min.js

This file was deleted.

Loading

0 comments on commit 2c7cba4

Please sign in to comment.