Skip to content

Modules #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Feb 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f52307a
es6 modules infrastructure: Babel and Browserify
dhilt Apr 18, 2016
564c03b
main sources, modules requiring
dhilt Apr 18, 2016
09429e3
logic modules split
dhilt Apr 18, 2016
8b1e0bd
build dist
dhilt Apr 18, 2016
69b81f4
Comment clarification
mfeingold Apr 18, 2016
b688de5
modules: excessive level reducing
dhilt Apr 18, 2016
a220cee
padding module
dhilt Apr 18, 2016
8686d2d
Merge branch 'modules' of https://github.com/angular-ui/ui-scroll int…
dhilt Apr 18, 2016
c1c043b
Update 'modules' branch to latest 'master'
dhilt Jan 13, 2017
a52a0c6
ui-scroll sources manual merging ('master' -> 'modules')
dhilt Jan 13, 2017
494db89
ui-scroll-grid refactoring and build fix
dhilt Jan 13, 2017
d236afc
avoid "new Buffer" due to nodejs Buffer entity
dhilt Jan 17, 2017
0c2f1cb
license deprecated syntax fix
dhilt Jan 17, 2017
03ab724
replace browserify es6->es5 compiling with webpack
dhilt Jan 17, 2017
57f0b11
distributives by the webpack
dhilt Jan 17, 2017
7bb7416
npm release sources clean up
dhilt Jan 20, 2017
94bd379
minification and banners: grunt --> webpack
dhilt Jan 20, 2017
555e2a7
jshint for modules
dhilt Jan 20, 2017
6ed94f2
setup development and production builds
dhilt Jan 20, 2017
3c89955
jqLiteExtras is a part of ui.scroll module now
dhilt Jan 20, 2017
1298e3c
cleanup webpack build folder
dhilt Jan 20, 2017
f408167
jqLiteExtras demo fixes
dhilt Jan 21, 2017
3f0e28b
babel and karma update
dhilt Jan 21, 2017
0391f87
grunt and node update
dhilt Jan 21, 2017
545c5a8
build process refactoring: compressed and uncompressed sources
dhilt Jan 27, 2017
65b6792
jqLiteExtras should run first
dhilt Jan 30, 2017
222e321
development server works over ./demo
dhilt Jan 30, 2017
5b54a79
Adapter isEmpty() public method, tests coverage
dhilt Feb 1, 2017
3364480
ui-scroll-demo (gif)
dhilt Feb 3, 2017
7a10a5d
readme major updates, to new release
dhilt Feb 3, 2017
6808cf4
add Development and Installation sections to README
dhilt Feb 4, 2017
2fa726d
v1.6.0
dhilt Feb 4, 2017
81c9a68
v1.6.0 public distributive
dhilt Feb 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ public
node_modules
temp
/nbproject/private/
local_development
*.log
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/node_modules/
/src
/temp
/test
.gitignore
.jshintrc
.npmignore
.travis.yml
bower.json
Gruntfile.js
webpack.config.js
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js

node_js:
- '0.10'
- '6'

before_install:
- export DISPLAY=:99.0
Expand Down
184 changes: 70 additions & 114 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
// Build configurations.
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-webpack');

var webpackSettings = require('./webpack.config.js');

grunt.initConfig({
packageBower: grunt.file.readJSON('./bower.json'),
timestamp: (new Date()).toISOString(),
releaseData: '/*!\n' +
' * <%= packageBower.name %>\n' +
' * <%= packageBower.homepage %>\n' +
' * Version: <%= packageBower.version %> -- <%= timestamp %>\n' +
' * License: <%= packageBower.license %>\n' +
' */\n',
connect: {
app: {
options: {
base: './',
middleware: require('./server/middleware'),
port: 5001
port: 5005,
base: './demo',
middleware: function (connect, options, middlewares) {
middlewares.unshift(function (req, res, next) {
var files = ['ui-scroll.js', 'ui-scroll-grid.js', 'ui-scroll.js.map', 'ui-scroll-grid.js.map'];
for (var i = 0; i < files.length; i++) {
if (req.url === '/dist/' + files[i]) {
res.end(grunt.file.read('./temp/' + files[i]));
}
}
next();
});
return middlewares;
}
}
}
},
Expand All @@ -35,108 +39,66 @@ module.exports = function (grunt) {
files: [
'src/**/*.js'
],
tasks: 'buildWatcher'
tasks: 'webpack:default'
}
},
karma: {
unit: {
options: {
autoWatch: true,
colors: true,
configFile: './test/karma.conf.js',
keepalive: true,
port: 8082,
runnerPort: 9100
}
options: {
configFile: './test/karma.conf.js',
runnerPort: 9100
},
travis: {
default: {},
compressed: {
options: {
colors: true,
configFile: './test/karma.conf.js',
runnerPort: 9100,
files: require('./test/karma.conf.files.js').compressedFiles,
port: 9876,
autoWatch: false,
keepalive: false,
singleRun: true
}
}
},
babel: {
options: {
//sourceMap: true,
babelrc: false,
presets: ['es2015']
webpack: {
options: webpackSettings.config,
default: {},
compressed: {
plugins: webpackSettings.compressedPlugins,
output: {
filename: '[name].min.js'
}
}
},
clean: {
temp: ['temp']
},
copy: {
sources: {
files: [
{expand: true, src: ['*'], cwd: 'temp', dest: 'dist/'},
]
},
dist: {
jqLiteExtrasFake: {
files: [
{expand: true, src: ['ui-scroll-jqlite.js'], cwd: 'src', dest: 'dist/'},
{
expand: true,
cwd: 'src/',
src: ['**/*.js'],
dest: 'temp/',
ext: '.js'
expand: true, src: ['ui-scroll-jqlite.js'], cwd: 'src', dest: 'dist/', rename: function (dest, src) {
return dest + src.replace(/\.js$/, ".min.js");
}
}
]
}
},
concat: {
options: {
banner: '<%= releaseData %> \n\n (function () {\n',
footer: '}());',
stripBanners: true,
process: function (src, filepath) {
var singleQuotes, strings;
console.log("Processing " + filepath + " ...");
strings = /("(?:(?:\\")|[^"])*")/g;
singleQuotes = /'/g;
return src.replace(strings, function (match) {
var result;
console.log("match: " + match);
result = "'" + match.substring(1, match.length - 1).replace(singleQuotes, "\\'") + "'";
console.log("replaced with: " + result);
return result;
});
}
},
dynamic_mappings: {
files: {
'dist/ui-scroll.js': ['./temp/**/ui-scroll.js'],
'dist/ui-scroll-grid.js': ['./temp/**/ui-scroll-grid.js'],
'dist/ui-scroll-jqlite.js': ['./temp/**/ui-scroll-jqlite.js']
}
}
},
uglify: {
options: {
banner: '<%= releaseData %>'
},
common: {
files: {
'./dist/ui-scroll.min.js': ['./dist/ui-scroll.js'],
'./dist/ui-scroll-grid.min.js': ['./dist/ui-scroll-grid.js'],
'./dist/ui-scroll-jqlite.min.js': ['./dist/ui-scroll-jqlite.js']
}
}
},
jshint: {
dist: {
sources: {
files: {
src: [
'./dist/ui-scroll.js',
'./dist/ui-scroll-jqlite.js'
]
},
options: {
jshintrc: '.jshintrc'
}
},
src: {
files: {
src: [
'./src/ui-scroll.js',
'./src/ui-scroll-jqlite.js'
'./src/*.js',
'./src/modules/*.js'
]
},
options: grunt.util._.extend({}, grunt.file.readJSON('.jshintrc'), grunt.file.readJSON('./src/.jshintrc'))
},
test: {
tests: {
files: {
src: ['./test/*Spec.js']
},
Expand All @@ -163,39 +125,33 @@ module.exports = function (grunt) {
}
});

/**
* Starts a web server
* Enter the following command at the command line to execute this task:
* grunt server
*/
grunt.registerTask('server', [
'webpack:default',
'connect',
'watch'
]);

grunt.registerTask('default', ['server']);

grunt.registerTask('test', [
'babel',
'karma:unit'
]);

grunt.registerTask('buildWatcher', [
'babel',
'concat'
'clean:temp',
'webpack:default',
'karma:default'
]);

grunt.registerTask('build', [
'jshint:test',
'jshint:src',
'babel',
'karma:travis',
'concat',
'uglify:common'
'jshint:tests',
'jshint:sources',
'clean:temp',
'webpack:compressed',
'karma:compressed',
'webpack:default',
'copy:sources',
'copy:jqLiteExtrasFake'
]);

grunt.registerTask('travis', [
'babel',
'karma:travis'
'webpack:compressed',
'karma:compressed'
]);
};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2013-2017 Hill30 INC, https://github.com/Hill30

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
22 changes: 0 additions & 22 deletions LICENSE-MIT

This file was deleted.

Loading