Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 0bac5f7

Browse files
committed
Merge pull request #9 from douglasduteil/ft-doc-t1
Doc refacto
2 parents f5cd565 + fbc1a7a commit 0bac5f7

File tree

6 files changed

+20
-53
lines changed

6 files changed

+20
-53
lines changed

.bowerrc

-3
This file was deleted.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
components/
1+
bower_components/
22
node_modules/

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ before_install:
88
- npm install -g bower grunt-cli
99
- npm install
1010
- bower install
11-
before_script: components/angular-ui-docs/.travis/before_script.sh
12-
after_success: components/angular-ui-docs/.travis/after_success.sh
11+
before_script: bower_components/angular-ui-docs/.travis/before_script.sh
12+
after_success: bower_components/angular-ui-docs/.travis/after_success.sh
1313
branches:
1414
only:
1515
- master

demo/demo.html

+1-44
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,8 @@
1111
left: 0;;
1212
}
1313
</style>
14-
<script>
1514

16-
$("#ace").hide();
17-
requirejs(
18-
{
19-
paths: {
20-
'ui.ace': "build/ui-ace.min"
21-
},
22-
shim: {
23-
'ui.ace': { deps: ['components/ace-builds/src-min-noconflict/ace.js'] }
24-
}
25-
},
26-
['ui.ace'],
27-
function () {
28-
29-
angular.module('doc.ui-ace', ['ui.ace', 'prettifyDirective'])
30-
.controller('AceCtrl', ['$scope', function ($scope) {
31-
$scope.aceModel = "Ace Hello World";
32-
}])
33-
;
34-
e$ = $("#ace");
35-
e$.removeAttr("ng-non-bindable");
36-
37-
angular.bootstrap(e$[0], ['doc.ui-ace']);
38-
e$.show();
39-
$("#ace-l").slideUp();
40-
41-
42-
}
43-
);
44-
</script>
45-
46-
<!-- Le loading
47-
================================================== -->
48-
49-
<div id="ace-l" class="loadingAnimation">
50-
<div class="bowl_ringG">
51-
<div class="ball_holderG">
52-
<div class="ballG">
53-
</div>
54-
</div>
55-
</div>
56-
</div>
57-
58-
<section id="ace" ng-non-bindable ng-controller="AceCtrl">
15+
<section id="ace" ng-app='doc.ui-ace' ng-controller="AceCtrl">
5916

6017
<div ui-ace ng-model="aceModel">Hello</div>
6118
<div ui-ace>World</div>

demo/demo.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
angular.module('doc.ui-ace', ['ui.ace', 'prettifyDirective'])
3+
.controller('AceCtrl', ['$scope', function ($scope) {
4+
$scope.aceModel = "Ace Hello World";
5+
}])
6+
;

gruntFile.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ module.exports = function (grunt) {
1818

1919
// Project configuration.
2020
grunt.initConfig({
21-
dist : 'components/angular-ui-docs',
21+
bower: 'bower_components',
22+
dist : '<%= bower %>/angular-ui-docs',
2223
pkg: grunt.file.readJSON('package.json'),
2324
meta: {
2425
banner: ['/**',
@@ -30,7 +31,13 @@ module.exports = function (grunt) {
3031
''].join('\n'),
3132
view : {
3233
humaName : "UI Ace",
33-
repoName : "ui-ace"
34+
repoName : "ui-ace",
35+
demoHTML : grunt.file.read("demo/demo.html"),
36+
demoJS : grunt.file.read("demo/demo.js"),
37+
js : [
38+
'<%= bower %>/ace-builds/src-min-noconflict/ace.js',
39+
'build/ui-ace.min.js'
40+
]
3441
}
3542
},
3643
karma: {
@@ -64,7 +71,7 @@ module.exports = function (grunt) {
6471
files: [
6572
{src: ['<%= meta.view.repoName %>.js'], dest: '<%= dist %>/build/<%= meta.view.repoName %>.js', filter: 'isFile'},
6673
{src: ['demo/demo.html'], dest: '<%= dist %>/demos.html', filter: 'isFile'},
67-
{src: ['components/ace-builds/src-min-noconflict/ace.js'], dest: '<%= dist %>/components/ace-builds/src-min-noconflict/ace.js', filter: 'isFile'}
74+
{src: ['<%= bower %>/ace-builds/src-min-noconflict/ace.js'], dest: '<%= dist %>/<%= bower %>/ace-builds/src-min-noconflict/ace.js', filter: 'isFile'}
6875
]
6976
},
7077
template : {

0 commit comments

Comments
 (0)