updated Gruntfile, added bower file, added simple example

fix-space-nbsp
Dmitri Akatov 11 years ago
parent c4d7a685a8
commit bad4423067

1
.gitignore vendored

@ -3,3 +3,4 @@ dist
.tmp
.sass-cache
app/components
components

@ -15,6 +15,7 @@ module.exports = (grunt) ->
src: 'src/'
test: 'test/'
target: 'dist/'
clean: target: src: ['<%= meta.target %>*js']
coffeelint: src:
files: src: ['<%= meta.src %>**/*.coffee']
options: max_line_length: level: 'warn'
@ -24,13 +25,12 @@ module.exports = (grunt) ->
'<%= meta.target %>radians.js': [
'<%= meta.src %>**/*.coffee'
]
clean: target: src: ['<%= meta.target %>*js']
mochacli:
options:
require: ['should']
compilers: ['coffee:coffee-script']
reporter: 'spec'
coffee: ['test/*.coffee']
test: ['test/*.coffee']
# Task configuration.
# concat:
@ -55,15 +55,15 @@ module.exports = (grunt) ->
# tasks: ['jshint:lib_test', 'qunit']
# These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-mocha-cli')
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-mocha-cli'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.registerTask 'test', ['mochacli']
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'build', ['clean', 'lint']
grunt.registerTask 'build', ['clean', 'lint', 'coffee']
grunt.registerTask 'default', ['lint' , 'test', 'build', 'jshint']

@ -0,0 +1,10 @@
{ "name": "radians"
, "version": "0.0.0"
, "dependencies":
{ "angular": "~1.0.5"
}
, "devDependencies":
{ "angular-mocks": "~1.0.5"
, "angular-scenario": "~1.0.5"
}
}

@ -0,0 +1 @@
components

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html ng-app="simple">
<head>
<title>Simple</title>
<script src="../components/angular/angular.js"></script>
<script src="../dist/radians.js"></script>
<script>
angular.module('simple', ['radians'])
.controller('Ctrl', function($scope, $window) {
$scope.model = "Initial stuff <b>with bold</b> <em>and italic</em> yay"
})
angular.bootstrap(document, ['simple'])
</script>
</head>
<body>
<div ng-controller="Ctrl">
<div contentEditable ng-model="model">
</div>
<br>
<div>
<label>Model:</label>
<pre>{{ model }}</pre>
</div>
</div>
</body>
</html>