Skip to content

Commit

Permalink
refactor: rename ssr->reverse, remove camel2kebab
Browse files Browse the repository at this point in the history
  • Loading branch information
harttle committed Dec 27, 2019
1 parent 5cc3710 commit c47862d
Show file tree
Hide file tree
Showing 386 changed files with 39 additions and 63 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bug.html
test.html
coverage/
errorShots/
/test/index-ssr.html
/test/ssr/ssr.spec.js
/test/index-reverse.html
/test/reverse/reverse.spec.js
/test/pref/tti.html
*.vscode
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"dev": "node ./tool/dev.js",
"dev:unit": "npx karma start ./test/karma.conf.js start",
"pretest": "npm run build && node ./test/ssr/build-test.js",
"pretest": "npm run build && node ./test/reverse/build-test.js",
"size": "npm run build && gzip -k dist/san.spa.modern.min.js && stat dist/san.spa.modern.min.js.gz && rm -f dist/*.gz",
"test": "npm run test:unit",
"test:unit": "npx karma start ./test/karma.conf.js --single-run",
Expand Down
24 changes: 0 additions & 24 deletions src/util/camel2kebab.js

This file was deleted.

4 changes: 2 additions & 2 deletions test/index-ssr.html.tpl → test/index-reverse.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<script src="../dist/san.dev.js"></script>

<!-- include spec files here... -->
<script src="ssr/ssr.spec.js"></script>
<script src="reverse/reverse.spec.js"></script>
</head>

<body>
##ssr-elements##
##rendered-elements##
</body>
</html>

2 changes: 1 addition & 1 deletion test/karma-context.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<!-- for ssr test -->
<!-- for reverse test -->
<div id="array-literal"><div><!--s-data:{"ext2":[],"ext":[]}--><ul><li>1</li><li>true</li><li>erik</li></ul></div></div>

<div id="bool-attr-bindings-false"><div><!--s-data:{}--><button>button</button></div></div>
Expand Down
4 changes: 2 additions & 2 deletions test/karma-context.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Reloaded before every execution run.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<!-- for ssr test -->
##ssr-elements##
<!-- for reverse test -->
##rendered-elements##

<!-- The scripts need to be in the body DOM element, as some test running frameworks need the body
to have already been created so they can insert their magic into it. For example, if loaded
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.
10 changes: 5 additions & 5 deletions test/ssr/build-test.js → test/reverse/build-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const san = require('../../dist/san');
const fs = require('fs');
const path = require('path');

let htmlTpl = fs.readFileSync(path.resolve(__dirname, '..', 'index-ssr.html.tpl'), 'UTF-8');
let htmlTpl = fs.readFileSync(path.resolve(__dirname, '..', 'index-reverse.html.tpl'), 'UTF-8');
let html = '';
let specTpls = '';

Expand Down Expand Up @@ -130,18 +130,18 @@ function writeIn({htmlTpl, html, specTpls}) {
let karmaHtml = fs.readFileSync(path.resolve(__dirname, '..', 'karma-context.html.tpl'), 'UTF-8');
fs.writeFileSync(
path.resolve(__dirname, '..', 'karma-context.html'),
karmaHtml.replace('##ssr-elements##', html),
karmaHtml.replace('##rendered-elements##', html),
'UTF-8'
);

fs.writeFileSync(
path.resolve(__dirname, '..', 'index-ssr.html'),
htmlTpl.replace('##ssr-elements##', html),
path.resolve(__dirname, '..', 'index-reverse.html'),
htmlTpl.replace('##rendered-elements##', html),
'UTF-8'
);

fs.writeFileSync(
path.resolve(__dirname, 'ssr.spec.js'),
path.resolve(__dirname, 'reverse.spec.js'),
specTpls,
'UTF-8'
);
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.
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.
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 c47862d

Please sign in to comment.