Last active
August 29, 2015 14:19
-
-
Save daffl/dd6bf4e7f5971774d3ea to your computer and use it in GitHub Desktop.
Using CanJS 2.2 with StealJS and NPM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from 'jquery'; | |
import stache from 'can/view/stache/stache'; | |
const template = stache('Hello {{message}}!'); | |
$(() => { | |
$('body').append(template({ message: 'David' })); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CanJS + Steal + NPM demo</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="node_modules/steal/steal.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "steal-can", | |
"version": "0.0.1", | |
"description": "A StealJS + CanJS example", | |
"main": "app", | |
"scripts": { | |
"build": "steal-tools" | |
}, | |
"author": "Bitovi", | |
"license": "MIT", | |
"dependencies": { | |
"can": "^2.2.5", | |
"jquery": "^2.1.3", | |
"steal": "^0.9.3" | |
}, | |
"devDependencies": { | |
"steal-tools": "^0.9.4" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment