mirror of
https://github.com/dkmstr/openuds.git
synced 2025-02-18 17:57:41 +03:00
Testing aroung with typescripy/javascript. For now, will keep coffeescript, too many changes for using typescript and no time ;-)
This commit is contained in:
parent
5d8a63e729
commit
3be93f2dcf
1
server/templates/user/.gitignore
vendored
1
server/templates/user/.gitignore
vendored
@ -2,7 +2,6 @@
|
||||
/node_modules
|
||||
/dist
|
||||
/dev
|
||||
.*
|
||||
/.*
|
||||
yarn-error.log
|
||||
|
||||
|
@ -9,10 +9,11 @@ module.exports = function(grunt) {
|
||||
dev: 'dev', // dev path
|
||||
// Source elements path
|
||||
src: {
|
||||
html: 'src/html/**/*.html',
|
||||
html: 'src/index.html',
|
||||
templates: 'src/templates/*.html',
|
||||
sass: 'src/css/uds.scss',
|
||||
sass_watch: 'src/css/**/*.scss',
|
||||
typescript: 'src/js/**/*.ts'
|
||||
coffee: 'src/js/**/*.coffee'
|
||||
}
|
||||
|
||||
},
|
||||
@ -32,12 +33,14 @@ module.exports = function(grunt) {
|
||||
src: [
|
||||
'node_modules/bootstrap/dist/js/bootstrap.js', // Bootstrap js
|
||||
'node_modules/jquery/dist/jquery.js', // Jquery js
|
||||
'node_modules/popper.js/dist/popper.js' // Popper js
|
||||
'node_modules/popper.js/dist/popper.js', // Popper js
|
||||
'node_modules/angular/angular.js' // Angular
|
||||
],
|
||||
dest: '<%= config.dev %>/js/lib'
|
||||
}, // To Lib folder
|
||||
// HTML for testing
|
||||
{ expand: true, flatten: true, src: ['<%= config.src.html %>'], dest:'<%= config.dev %>' }
|
||||
// Index & Templates
|
||||
{ expand: true, flatten: true, src: ['<%= config.src.html %>'], dest:'<%= config.dev %>' },
|
||||
{ expand: true, flatten: true, src: ['<%= config.src.templates %>'], dest:'<%= config.dev %>/templates' },
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
@ -51,32 +54,38 @@ module.exports = function(grunt) {
|
||||
'node_modules/popper.js/dist/popper.min.js' // Popper js
|
||||
],
|
||||
dest: '<%= config.dist %>/js/lib'
|
||||
}/*, // To Lib folder
|
||||
{ expand: true, flatten: true, src: ['<%= config.src.html %>'], dest:'<%= config.dist %>' } */
|
||||
},
|
||||
// Index & Templates
|
||||
{ expand: true, flatten: true, src: ['<%= config.src.html %>'], dest:'<%= config.dist %>' },
|
||||
{ expand: true, flatten: true, src: ['<%= config.src.templates %>'], dest:'<%= config.dist %>/templates' },
|
||||
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
typescript: {
|
||||
coffee: {
|
||||
options: {
|
||||
target: 'es3',
|
||||
join: true,
|
||||
},
|
||||
dev: {
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
src: [ '<%= config.src.typescript %>' ],
|
||||
dest: '<%= config.dev %>/js/uds.js',
|
||||
files: {
|
||||
'<%= config.dev %>/js/uds.js': ['<%= config.src.coffee %>']
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
options: {
|
||||
sourceMap: false,
|
||||
},
|
||||
src: [ '<%= config.src.typescript %>' ],
|
||||
dest: '<%= config.dist %>/js/uds.js',
|
||||
files: {
|
||||
'<%= config.dist %>/js/uds.js': ['<%= config.src.coffee %>']
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// Compiles Sass to CSS and generates necessary files if requested
|
||||
sass: {
|
||||
options: {
|
||||
@ -135,11 +144,11 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-http-server');
|
||||
grunt.loadNpmTasks('grunt-typescript');
|
||||
grunt.loadNpmTasks('grunt-contrib-coffee');
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('dev', ['copy:dev', 'typescript:dev', 'sass:dev'])
|
||||
grunt.registerTask('dist', ['clean:dist', 'copy:dist', 'typescript:dist', 'sass:dist'])
|
||||
grunt.registerTask('dev', ['copy:dev', 'coffee:dev', 'sass:dev'])
|
||||
grunt.registerTask('dist', ['clean:dist', 'copy:dist', 'coffee:dist', 'sass:dist'])
|
||||
grunt.registerTask('default', ['dev']);
|
||||
|
||||
};
|
||||
|
@ -5,15 +5,16 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular": "^1.6.9",
|
||||
"angular-route": "^1.6.9",
|
||||
"bootstrap": "^4.0.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-clean": "^1.1.0",
|
||||
"grunt-contrib-coffee": "^2.0.0",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-sass": "^1.0.0",
|
||||
"grunt-contrib-watch": "^1.0.0",
|
||||
"grunt-http-server": "^2.0.0",
|
||||
"grunt-typescript": "^0.8.0",
|
||||
"jquery": "^3.3.1",
|
||||
"popper.js": "^1.12.9"
|
||||
},
|
||||
|
@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8">
|
||||
<title>My HTML File</title>
|
||||
<link rel="stylesheet" href="css/uds.css" />
|
||||
<script src="bower_components/angular/angular.js"></script>
|
||||
<script src="js/lib/angular.js"></script>
|
||||
<script src="js/uds.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user