Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mikado v0.7.46 #660

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frameworks/keyed/mikado/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
},
"scripts": {
"compile": "mikado-compile src/template/app.html && mikado-compile src/template/item.html && echo Compile Complete. && exit 0",
"build": "npm run compile && node task/build RELEASE=custom DEBUG=false USE_POLYFILL=false SUPPORT_CACHE=false SUPPORT_EVENTS=true SUPPORT_STORAGE=true SUPPORT_HELPERS='swap' SUPPORT_ASYNC=false SUPPORT_TRANSPORT=false SUPPORT_TEMPLATE_EXTENSION=false SUPPORT_REACTIVE=false SUPPORT_CACHE_HELPERS=false SUPPORT_POOLS=false SUPPORT_COMPILE=false && exit 0",
"build": "npm run compile && node task/build RELEASE=custom DEBUG=false USE_POLYFILL=false SUPPORT_CACHE=false SUPPORT_EVENTS=true SUPPORT_STORAGE=false SUPPORT_HELPERS='swap' SUPPORT_ASYNC=false SUPPORT_TRANSPORT=false SUPPORT_TEMPLATE_EXTENSION=false SUPPORT_REACTIVE=false SUPPORT_CACHE_HELPERS=false SUPPORT_POOLS=false SUPPORT_CALLBACKS=false SUPPORT_COMPILE=false && exit 0",
"build-prod": "npm run build"
},
"dependencies": {
"mikado": "^0.6.53"
"mikado": "0.7.46"
},
"devDependencies": {
"google-closure-compiler": "20191012.0.0-nightly",
"google-closure-compiler": "20191105.0.0-nightly",
"mikado-compile": "0.6.5"
}
}
20 changes: 10 additions & 10 deletions frameworks/keyed/mikado/src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ let _nextId = 1;

export function buildData(count){

if(count === 1){

return {

id: _nextId++,
label: ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
}
}
// if(count === 1){
//
// return {
//
// id: _nextId++,
// label: ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
// }
// }

const data = new Array(count);

for(let i = 0; i < count; i++){

data[i] = {

id: _nextId++,
label: ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
"id": _nextId++,
"label": ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
};
}

Expand Down
26 changes: 13 additions & 13 deletions frameworks/keyed/mikado/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ import { buildData } from "./data.js";

Mikado.once(document.getElementById("main"), app);

const state = { "selected": {} };
let data, state = {"selected": {}};
const root = document.getElementById("tbody");
const mikado = Mikado.new(root, item, {
const view = new Mikado(root, item, {
"reuse": false, "state": state
})
.route("run", () => { mikado.render(buildData(1000)) })
.route("runlots", () => { mikado.render(buildData(10000)) })
.route("add", () => { mikado.append(buildData(1000)) })
.route("run", () => view.render(data = buildData(1000)))
.route("runlots", () => view.render(buildData(10000)))
.route("add", () => view.append(buildData(1000)))
.route("update", () => {
for(let i = 0, len = mikado.length; i < len; i += 10){
mikado.data(i).label += " !!!";
mikado.refresh(i);
for(let i = 0, len = view.length, item; i < len; i += 10){
(item = data[i]).label += " !!!";
view.update(i, item);
}
})
.route("clear", () => { mikado.clear() })
.route("swaprows", () => { mikado.swap(1, 998) })
.route("remove", target => { mikado.remove(target) })
.route("clear", () => view.clear())
.route("swaprows", () => view.swap(1, 998))
.route("remove", target => view.remove(target))
.route("select", target => {
state["selected"].className = "";
(state["selected"] = target).className = "danger";
state.selected.className = "";
(state.selected = target).className = "danger";
})
.listen("click");
4 changes: 2 additions & 2 deletions frameworks/keyed/mikado/task/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const parameter = (function(opt){
generate_exports: true,
export_local_property_definitions: true,
language_in: "ECMASCRIPT6_STRICT",
language_out: "ECMASCRIPT5_STRICT",
language_out: "ECMASCRIPT6_STRICT",
process_closure_primitives: true,
summary_detail_level: 3,
warning_level: "VERBOSE",
Expand Down Expand Up @@ -88,7 +88,7 @@ const parameter = (function(opt){
//formatting: "PRETTY_PRINT"
});

exec("java -jar node_modules/google-closure-compiler-java/compiler.jar" + parameter + " --js='src/*.js' --js='src/template/*.es6.js' --js='node_modules/mikado/src/*.js' --js='!src/*config.js'" + flag_str + " --js_output_file='dist/main.js' && exit 0", function(){
exec("java -jar node_modules/google-closure-compiler-java/compiler.jar" + parameter + " --js='src/*.js' --js='src/template/*.es6.js' --js='node_modules/mikado/src/*.js'" + flag_str + " --js_output_file='dist/main.js' && exit 0", function(){

console.log("Build Complete.");
});
Expand Down
30 changes: 0 additions & 30 deletions frameworks/keyed/mikado/webpack.config.js

This file was deleted.

6 changes: 3 additions & 3 deletions frameworks/non-keyed/mikado/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
},
"scripts": {
"compile": "mikado-compile src/template/app.html && mikado-compile src/template/item.html && echo Compile Complete. && exit 0",
"build": "npm run compile && node task/build RELEASE=custom DEBUG=false USE_POLYFILL=false SUPPORT_CACHE=false SUPPORT_EVENTS=true SUPPORT_STORAGE=true SUPPORT_HELPERS='swap' SUPPORT_ASYNC=false SUPPORT_TRANSPORT=false SUPPORT_TEMPLATE_EXTENSION=false SUPPORT_REACTIVE=false SUPPORT_CACHE_HELPERS=false SUPPORT_POOLS=false SUPPORT_COMPILE=false && exit 0",
"build": "npm run compile && node task/build RELEASE=custom DEBUG=false USE_POLYFILL=false SUPPORT_CACHE=false SUPPORT_EVENTS=true SUPPORT_STORAGE=false SUPPORT_HELPERS='swap' SUPPORT_ASYNC=false SUPPORT_TRANSPORT=false SUPPORT_TEMPLATE_EXTENSION=false SUPPORT_REACTIVE=false SUPPORT_CACHE_HELPERS=false SUPPORT_POOLS=false SUPPORT_CALLBACKS=false SUPPORT_COMPILE=false && exit 0",
"build-prod": "npm run build"
},
"dependencies": {
"mikado": "^0.6.53"
"mikado": "0.7.46"
},
"devDependencies": {
"google-closure-compiler": "20191012.0.0-nightly",
"google-closure-compiler": "20191105.0.0-nightly",
"mikado-compile": "0.6.5"
}
}
20 changes: 10 additions & 10 deletions frameworks/non-keyed/mikado/src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ let _nextId = 1;

export function buildData(count){

if(count === 1){

return {

id: _nextId++,
label: ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
}
}
// if(count === 1){
//
// return {
//
// id: _nextId++,
// label: ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
// }
// }

const data = new Array(count);

for(let i = 0; i < count; i++){

data[i] = {

id: _nextId++,
label: ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
"id": _nextId++,
"label": ADJECTIVES[_random(len_ADJECTIVES)] + " " + COLOURS[_random(len_COLOURS)] + " " + NOUNS[_random(len_NOUNS)]
};
}

Expand Down
26 changes: 13 additions & 13 deletions frameworks/non-keyed/mikado/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ import { buildData } from "./data.js";

Mikado.once(document.getElementById("main"), app);

const state = { "selected": {} };
let data, state = {"selected": {}};
const root = document.getElementById("tbody");
const mikado = Mikado.new(root, item, {
const view = new Mikado(root, item, {
"reuse": true, "state": state
})
.route("run", () => { mikado.render(buildData(1000)) })
.route("runlots", () => { mikado.render(buildData(10000)) })
.route("add", () => { mikado.append(buildData(1000)) })
.route("run", () => view.render(data = buildData(1000)))
.route("runlots", () => view.render(buildData(10000)))
.route("add", () => view.append(buildData(1000)))
.route("update", () => {
for(let i = 0, len = mikado.length; i < len; i += 10){
mikado.data(i).label += " !!!";
mikado.refresh(i);
for(let i = 0, len = view.length, item; i < len; i += 10){
(item = data[i]).label += " !!!";
view.update(i, item);
}
})
.route("clear", () => { mikado.clear() })
.route("swaprows", () => { mikado.swap(1, 998) })
.route("remove", target => { mikado.remove(target) })
.route("clear", () => view.clear())
.route("swaprows", () => view.swap(1, 998))
.route("remove", target => view.remove(target))
.route("select", target => {
state["selected"].className = "";
(state["selected"] = target).className = "danger";
state.selected.className = "";
(state.selected = target).className = "danger";
})
.listen("click");
4 changes: 2 additions & 2 deletions frameworks/non-keyed/mikado/task/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const parameter = (function(opt){
generate_exports: true,
export_local_property_definitions: true,
language_in: "ECMASCRIPT6_STRICT",
language_out: "ECMASCRIPT5_STRICT",
language_out: "ECMASCRIPT6_STRICT",
process_closure_primitives: true,
summary_detail_level: 3,
warning_level: "VERBOSE",
Expand Down Expand Up @@ -88,7 +88,7 @@ const parameter = (function(opt){
//formatting: "PRETTY_PRINT"
});

exec("java -jar node_modules/google-closure-compiler-java/compiler.jar" + parameter + " --js='src/*.js' --js='src/template/*.es6.js' --js='node_modules/mikado/src/*.js' --js='!src/*config.js'" + flag_str + " --js_output_file='dist/main.js' && exit 0", function(){
exec("java -jar node_modules/google-closure-compiler-java/compiler.jar" + parameter + " --js='src/*.js' --js='src/template/*.es6.js' --js='node_modules/mikado/src/*.js'" + flag_str + " --js_output_file='dist/main.js' && exit 0", function(){

console.log("Build Complete.");
});
Expand Down
30 changes: 0 additions & 30 deletions frameworks/non-keyed/mikado/webpack.config.js

This file was deleted.