Skip to content

Commit

Permalink
Merge gruntfile and concat changes in
Browse files Browse the repository at this point in the history
  • Loading branch information
nmielnik committed Feb 15, 2015
2 parents 484cecd + 8d91cc2 commit 0eeeb0d
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 42 deletions.
10 changes: 6 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function (grunt) {

gruntConfig.jasmine = {
suite: {
src: srcFiles,
src: 'dist/js/medium-editor.js',
options: {
specs: 'spec/*.spec.js',
helpers: 'spec/helpers/*.js',
Expand Down Expand Up @@ -168,7 +168,9 @@ module.exports = function (grunt) {
stripBanners: true
},
dist: {
src: srcFiles,
src: ['src/wrappers/start.js']
.concat(srcFiles)
.concat(['src/wrappers/end.js']),
dest: 'dist/js/<%= pkg.name %>.js'
}
};
Expand All @@ -191,8 +193,8 @@ module.exports = function (grunt) {
]
});

grunt.registerTask('test', ['jslint', 'jasmine:suite', 'csslint']);
grunt.registerTask('js', ['jslint', 'jasmine:suite', 'concat', 'uglify']);
grunt.registerTask('test', ['jslint', 'concat', 'jasmine:suite', 'csslint']);
grunt.registerTask('js', ['jslint', 'concat', 'jasmine:suite', 'uglify']);
grunt.registerTask('css', ['sass', 'autoprefixer', 'cssmin', 'csslint']);
grunt.registerTask('default', ['js', 'css']);

Expand Down
4 changes: 2 additions & 2 deletions dist/css/medium-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
20% {
-webkit-transform: matrix(0.99, 0, 0, 1, 0, 2);
transform: matrix(0.99, 0, 0, 1, 0, 2);
opacity: 0.7; }
opacity: .7; }

40% {
-webkit-transform: matrix(1, 0, 0, 1, 0, -1);
Expand All @@ -41,7 +41,7 @@
20% {
-webkit-transform: matrix(0.99, 0, 0, 1, 0, 2);
transform: matrix(0.99, 0, 0, 1, 0, 2);
opacity: 0.7; }
opacity: .7; }

40% {
-webkit-transform: matrix(1, 0, 0, 1, 0, -1);
Expand Down
4 changes: 2 additions & 2 deletions dist/css/themes/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
background-color: transparent;
color: #fff;
box-sizing: border-box;
-webkit-transition: background-color 0.2s ease-in, color 0.2s ease-in;
transition: background-color 0.2s ease-in, color 0.2s ease-in; }
-webkit-transition: background-color .2s ease-in, color .2s ease-in;
transition: background-color .2s ease-in, color .2s ease-in; }
.medium-editor-toolbar li button:hover {
background-color: #3276b1;
color: #fff; }
Expand Down
4 changes: 2 additions & 2 deletions dist/css/themes/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
background: -webkit-linear-gradient(bottom, #242424, rgba(36, 36, 36, 0.89));
background: linear-gradient(bottom, #242424, rgba(36, 36, 36, 0.89));
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
-webkit-transition: background-color 0.2s ease-in;
transition: background-color 0.2s ease-in; }
-webkit-transition: background-color .2s ease-in;
transition: background-color .2s ease-in; }
.medium-editor-toolbar li button:hover {
background-color: #000;
color: yellow; }
Expand Down
4 changes: 2 additions & 2 deletions dist/css/themes/flat.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
border-right: 1px solid #9ccea6;
background-color: transparent;
color: #fff;
-webkit-transition: background-color 0.2s ease-in, color 0.2s ease-in;
transition: background-color 0.2s ease-in, color 0.2s ease-in; }
-webkit-transition: background-color .2s ease-in, color .2s ease-in;
transition: background-color .2s ease-in, color .2s ease-in; }
.medium-editor-toolbar li button:hover {
background-color: #346a3f;
color: #fff; }
Expand Down
4 changes: 2 additions & 2 deletions dist/css/themes/mani.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
border-right: 1px solid #cdd6e0;
background-color: transparent;
color: #40648a;
-webkit-transition: background-color 0.2s ease-in, color 0.2s ease-in;
transition: background-color 0.2s ease-in, color 0.2s ease-in; }
-webkit-transition: background-color .2s ease-in, color .2s ease-in;
transition: background-color .2s ease-in, color .2s ease-in; }
.medium-editor-toolbar li button:hover {
background-color: #5c90c7;
background-color: rgba(92, 144, 199, 0.45);
Expand Down
4 changes: 2 additions & 2 deletions dist/css/themes/roman.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
background: -webkit-linear-gradient(top, #fff, rgba(0, 0, 0, 0.1));
background: linear-gradient(top, #fff, rgba(0, 0, 0, 0.1));
text-shadow: 1px 4px 6px #def, 0 0 0 #000, 1px 4px 6px #def;
-webkit-transition: background-color 0.2s ease-in;
transition: background-color 0.2s ease-in; }
-webkit-transition: background-color .2s ease-in;
transition: background-color .2s ease-in; }
.medium-editor-toolbar li button:hover {
background-color: #fff;
color: #000;
Expand Down
30 changes: 18 additions & 12 deletions dist/js/medium-editor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
(function (root, factory) {
'use strict';
if (typeof module === 'object') {
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(factory);
} else {
root.MediumEditor = factory;
}
}(this, function () {

'use strict';

var mediumEditorUtil;

(function (window, document) {
Expand Down Expand Up @@ -1130,17 +1143,7 @@ function MediumEditor(elements, options) {
return this.init(elements, options);
}

if (typeof module === 'object') {
module.exports = MediumEditor;
// AMD support
} else if (typeof define === 'function' && define.amd) {
define(function () {
'use strict';
return MediumEditor;
});
}

(function (window, document) {
(function () {
'use strict';

MediumEditor.statics = {
Expand Down Expand Up @@ -2715,4 +2718,7 @@ if (typeof module === 'object') {
}
};

}(window, document));
}());

return MediumEditor;
}()));
4 changes: 2 additions & 2 deletions dist/js/medium-editor.min.js

Large diffs are not rendered by default.

14 changes: 2 additions & 12 deletions src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ function MediumEditor(elements, options) {
return this.init(elements, options);
}

if (typeof module === 'object') {
module.exports = MediumEditor;
// AMD support
} else if (typeof define === 'function' && define.amd) {
define(function () {
'use strict';
return MediumEditor;
});
}

(function (window, document) {
(function () {
'use strict';

MediumEditor.statics = {
Expand Down Expand Up @@ -1592,4 +1582,4 @@ if (typeof module === 'object') {
}
};

}(window, document));
}());
2 changes: 2 additions & 0 deletions src/wrappers/end.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
return MediumEditor;
}()));
12 changes: 12 additions & 0 deletions src/wrappers/start.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function (root, factory) {
'use strict';
if (typeof module === 'object') {
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(factory);
} else {
root.MediumEditor = factory;
}
}(this, function () {

'use strict';

0 comments on commit 0eeeb0d

Please sign in to comment.