Skip to content

Commit ba89ff1

Browse files
author
Mohamed Cherif Bouchelaghem
authored
Merge pull request #6 from canjs/major
Major
2 parents 0e3f94c + 0e8f709 commit ba89ff1

37 files changed

+5928
-223
lines changed

.editorconfig

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
# editorconfig.org
2-
root = true
3-
1+
; Unix-style newlines
42
[*]
5-
indent_style = space
6-
indent_size = 2
7-
end_of_line = lf
8-
charset = utf-8
9-
trim_trailing_whitespace = true
3+
end_of_line = LF
4+
indent_style = tab
5+
trim_trailing_whitespace = false
106
insert_final_newline = true

.gitignore

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,64 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Node template
31
# Logs
42
logs
53
*.log
6-
npm-debug.log*
7-
yarn-debug.log*
8-
yarn-error.log*
94

105
# Runtime data
116
pids
127
*.pid
138
*.seed
14-
*.pid.lock
159

1610
# Directory for instrumented libs generated by jscoverage/JSCover
1711
lib-cov
1812

1913
# Coverage directory used by tools like istanbul
2014
coverage
2115

22-
# nyc test coverage
23-
.nyc_output
24-
2516
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
2617
.grunt
2718

28-
# Bower dependency directory (https://bower.io/)
29-
bower_components
30-
31-
# node-waf configuration
32-
.lock-wscript
33-
3419
# Compiled binary addons (http://nodejs.org/api/addons.html)
3520
build/Release
3621

37-
# Dependency directories
38-
node_modules/
39-
jspm_packages/
22+
# Dependency directory
23+
# Commenting this out is preferred by some people, see
24+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25+
node_modules
4026

41-
# Typescript v1 declaration files
42-
typings/
27+
# Users Environment Variables
28+
.lock-wscript
4329

44-
# Optional npm cache directory
45-
.npm
30+
doc/
31+
dist/
32+
package-lock.json
33+
# Logs
34+
logs
35+
*.log
4636

47-
# Optional eslint cache
48-
.eslintcache
37+
# Runtime data
38+
pids
39+
*.pid
40+
*.seed
4941

50-
# Optional REPL history
51-
.node_repl_history
42+
# Directory for instrumented libs generated by jscoverage/JSCover
43+
lib-cov
5244

53-
# Output of 'npm pack'
54-
*.tgz
45+
# Coverage directory used by tools like istanbul
46+
coverage
5547

56-
# Yarn Integrity file
57-
.yarn-integrity
48+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
49+
.grunt
5850

59-
# dotenv environment variables file
60-
.env
51+
# Compiled binary addons (http://nodejs.org/api/addons.html)
52+
build/Release
6153

62-
# Webstorm
63-
/.idea
54+
# Dependency directory
55+
# Commenting this out is preferred by some people, see
56+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
57+
node_modules
6458

65-
# Build
66-
/lib
59+
# Users Environment Variables
60+
.lock-wscript
6761

68-
# OSX
69-
.DS_Store
62+
doc/
63+
dist/
64+
package-lock.json

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
node_modules
55
.idea
66
.npmignore
7+
examples/
8+
!tests/

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

examples/basics/app.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var renderer = require('./app.stache');
2+
3+
document.addEventListener("DOMContentLoaded", function() {
4+
var frag = renderer({
5+
message: 'Hello loaders'
6+
})
7+
document.body.appendChild(frag);
8+
});

examples/basics/app.stache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{message}}

examples/basics/dist/bundle.js

Lines changed: 1634 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/basics/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title></title>
5+
</head>
6+
<body>
7+
<script type="text/javascript" src="dist/bundle.js"></script>
8+
</body>
9+
</html>

examples/basics/webpack.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
var path = require("path");
2+
3+
4+
module.exports = {
5+
entry: "./app.js",
6+
output: {
7+
path: path.resolve(__dirname, 'dist'),
8+
filename: "bundle.js"
9+
},
10+
mode: "development",
11+
resolveLoader: {
12+
modules: [
13+
'node_modules',
14+
path.resolve(__dirname, '../')
15+
]
16+
},
17+
module: {
18+
rules: [{
19+
test: /\.stache/,
20+
use: [
21+
{
22+
loader: path.resolve('../../')
23+
}
24+
]
25+
}]
26+
}
27+
};

examples/import/app.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var renderer = require('./app.stache');
2+
var partial = require('./partial.stache');
3+
var stache = require('can-stache');
4+
5+
stache.registerPartial( "partial.stache", partial );
6+
7+
document.addEventListener("DOMContentLoaded", function() {
8+
var frag = renderer({
9+
message: 'Hello loaders',
10+
inlineMessage: 'Hello from inline partial'
11+
})
12+
document.body.appendChild(frag);
13+
});

0 commit comments

Comments
 (0)