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

Commit ed2b184

Browse files
committed
merge with upstream
2 parents 745a315 + cb2074d commit ed2b184

File tree

86 files changed

+5721
-6484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5721
-6484
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = false
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.json]
12+
indent_size = 2

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules/
55
examples/uploads/*
66
.idea/
77
server.js
8-
.tm_properties
8+
.tm_properties
9+
.project

.jshintrc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
"jQuery": false,
44
"document": false,
55
"window": false,
6-
"FB": false,
76
"module": false,
87
"test": false,
98
"asyncTest": false,
109
"ok": false,
1110
"equal": false,
12-
"deepEqual": false,
1311
"start": false,
14-
"MediumEditor": false
12+
"sinon": false,
13+
"alert": false,
14+
"FB": false
1515
},
1616

1717
"jquery" : true,
1818
"browser" : true,
1919

2020
"boss" : false,
2121
"curly": false,
22-
"debug": true,
23-
"devel": true,
22+
"debug": false,
23+
"devel": false,
2424
"eqeqeq": true,
2525
"evil": false,
2626
"forin": false,

Gruntfile.js

Lines changed: 109 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,130 @@
11
module.exports = function(grunt) {
22

3-
grunt.initConfig({
4-
pkg: grunt.file.readJSON('package.json'),
5-
banner: '/*! \n * <%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>\n *\n * <%= pkg.homepage %>\n * \n * Copyright (c) 2014 <%= pkg.author.name %> (<%= pkg.author.url %>)\n * Released under the <%= pkg.license %> license\n */\n\n',
3+
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
5+
banner: '/*! \n * <%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>\n *\n * <%= pkg.homepage %>\n * \n * Copyright (c) 2014 <%= pkg.author.name %> (<%= pkg.author.url %>)\n * Released under the <%= pkg.license %> license\n */\n\n',
66

7-
uglify: {
8-
dist: {
9-
options: {
10-
banner: '<%= banner %>'
7+
uglify: {
8+
dist: {
9+
options: {
10+
banner: '<%= banner %>'
11+
},
12+
src: ['src/js/templates.js', 'src/js/core.js', 'src/js/*.js'],
13+
dest: 'dist/js/<%= pkg.name %>.min.js'
14+
}
1115
},
12-
src: ['src/js/medium-editor-insert-plugin.js', 'src/js/*.js'],
13-
dest: 'dist/js/<%= pkg.name %>.all.min.js'
14-
},
15-
addons: {
16-
options: {
17-
banner: '<%= banner %>'
16+
17+
concat: {
18+
dist: {
19+
options: {
20+
banner: '<%= banner %>'
21+
},
22+
src: ['src/js/templates.js', 'src/js/core.js', 'src/js/*.js'],
23+
dest: 'dist/js/<%= pkg.name %>.js'
24+
}
1825
},
19-
files: [{
20-
expand: true,
21-
cwd: 'src/js',
22-
src: '**/*.js',
23-
dest: 'dist/js/addons',
24-
ext: '.min.js'
25-
}]
26-
}
27-
},
2826

29-
concat: {
30-
dist: {
31-
options: {
32-
banner: '<%= banner %>'
27+
jshint: {
28+
options: {
29+
jshintrc: true
30+
},
31+
files: ['src/js/*.js', '!src/js/templates.js', 'test/*.js']
3332
},
34-
src: ['src/js/medium-editor-insert-plugin.js', 'src/js/*.js'],
35-
dest: 'dist/js/<%= pkg.name %>.all.js'
36-
},
37-
addons: {
38-
options: {
39-
banner: '<%= banner %>'
40-
},
41-
files: [{
42-
expand: true,
43-
cwd: 'src/js',
44-
src: '**/*.js',
45-
dest: 'dist/js/addons',
46-
ext: '.js'
47-
}]
48-
}
49-
},
5033

51-
jshint: {
52-
files: ['src/js/*.js', 'src/js/**/*.js', 'test/*.js', 'test/**/*.js'],
53-
options: {
54-
jshintrc: true,
55-
ignores: ['test/lib/**/*.js']
56-
}
57-
},
34+
qunit: {
35+
unit: 'test.html'
36+
},
5837

59-
qunit: {
60-
unit: 'test.html'
61-
},
38+
sass: {
39+
dist: {
40+
files: [{
41+
expand: true,
42+
cwd: 'src/sass/',
43+
src: ['*.scss'],
44+
dest: 'dist/css/',
45+
ext: '.css'
46+
}]
47+
}
48+
},
6249

63-
sass: {
64-
dist: {
65-
files: [{
66-
expand: true,
67-
cwd: 'src/sass/',
68-
src: ['*.scss'],
69-
dest: 'dist/css/',
70-
ext: '.css'
71-
}]
72-
}
73-
},
50+
autoprefixer: {
51+
dist: {
52+
src: 'dist/css/*.css'
53+
}
54+
},
7455

75-
autoprefixer: {
76-
dist: {
77-
src: 'dist/css/*.css'
78-
}
79-
},
56+
csso: {
57+
dist: {
58+
options: {
59+
banner: '<%= banner %>'
60+
},
61+
expand: true,
62+
cwd: 'dist/css/',
63+
src: ['*.css', '!*.min.css'],
64+
dest: 'dist/css/',
65+
ext: '.min.css'
66+
}
67+
},
8068

81-
csso: {
82-
dist: {
83-
options: {
84-
banner: '<%= banner %>'
69+
usebanner: {
70+
dist: {
71+
options: {
72+
banner: '<%= banner %>',
73+
linebreak: false
74+
},
75+
files: [{
76+
expand: true,
77+
cwd: 'dist/css/',
78+
src: ['*.css', '!*.min.css'],
79+
dest: 'dist/css/',
80+
ext: '.css'
81+
}]
82+
}
8583
},
86-
expand: true,
87-
cwd: 'dist/css/',
88-
src: ['*.css', '!*.min.css'],
89-
dest: 'dist/css/',
90-
ext: '.min.css'
91-
}
92-
},
9384

94-
usebanner: {
95-
dist: {
96-
options: {
97-
banner: '<%= banner %>',
98-
linebreak: false
85+
watch: {
86+
styles: {
87+
files: 'src/sass/**/*.scss',
88+
tasks: ['css'],
89+
options: {
90+
debounceDelay: 250
91+
}
92+
},
93+
templates: {
94+
files: 'src/js/templates/**/*.hbs',
95+
tasks: ['handlebars'],
96+
options: {
97+
debounceDelay: 250
98+
}
99+
}
99100
},
100-
files: [{
101-
expand: true,
102-
cwd: 'dist/css/',
103-
src: ['*.css', '!*.min.css'],
104-
dest: 'dist/css/',
105-
ext: '.css'
106-
}]
107-
}
108-
},
109101

110-
watch: {
111-
scripts: {
112-
files: ['src/js/**/*.js'],
113-
tasks: ['js'],
114-
options: {
115-
debounceDelay: 250
116-
}
117-
},
118-
styles: {
119-
files: 'src/sass/**/*.scss',
120-
tasks: ['css'],
121-
options: {
122-
debounceDelay: 250
102+
handlebars: {
103+
compile: {
104+
options: {
105+
namespace: 'MediumInsert.Templates'
106+
},
107+
files: {
108+
'src/js/templates.js': 'src/js/templates/*.hbs'
109+
}
110+
}
123111
}
124-
}
125-
}
126-
});
112+
});
127113

128-
grunt.loadNpmTasks('grunt-contrib-uglify');
129-
grunt.loadNpmTasks('grunt-contrib-jshint');
130-
grunt.loadNpmTasks('grunt-contrib-qunit');
131-
grunt.loadNpmTasks('grunt-contrib-compass');
132-
grunt.loadNpmTasks('grunt-contrib-watch');
133-
grunt.loadNpmTasks('grunt-contrib-concat');
134-
grunt.loadNpmTasks('grunt-autoprefixer');
135-
grunt.loadNpmTasks('grunt-sass');
136-
grunt.loadNpmTasks('grunt-csso');
137-
grunt.loadNpmTasks('grunt-banner');
114+
grunt.loadNpmTasks('grunt-contrib-uglify');
115+
grunt.loadNpmTasks('grunt-contrib-jshint');
116+
grunt.loadNpmTasks('grunt-contrib-qunit');
117+
grunt.loadNpmTasks('grunt-contrib-watch');
118+
grunt.loadNpmTasks('grunt-contrib-concat');
119+
grunt.loadNpmTasks('grunt-autoprefixer');
120+
grunt.loadNpmTasks('grunt-sass');
121+
grunt.loadNpmTasks('grunt-csso');
122+
grunt.loadNpmTasks('grunt-banner');
123+
grunt.loadNpmTasks('grunt-contrib-handlebars');
138124

139-
grunt.registerTask('test', ['jshint', 'qunit']);
140-
grunt.registerTask('js', ['test', 'uglify', 'concat']);
141-
grunt.registerTask('css', ['sass', 'autoprefixer', 'csso', 'usebanner']);
142-
grunt.registerTask('default', ['js', 'css']);
125+
grunt.registerTask('test', ['jshint', 'qunit']);
126+
grunt.registerTask('js', ['test', 'handlebars', 'uglify', 'concat']);
127+
grunt.registerTask('css', ['sass', 'autoprefixer', 'csso', 'usebanner']);
128+
grunt.registerTask('default', ['js', 'css']);
143129

144130
};

bower.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "medium-editor-insert-plugin",
3-
"version": "0.3.2",
3+
"version": "1.0.2",
44
"description": "jQuery insert plugin for MediumEditor",
55
"main": [
6-
"dist/js/medium-editor-insert-plugin.all.js",
6+
"dist/js/medium-editor-insert-plugin.js",
77
"dist/css/medium-editor-insert-plugin.css"
88
],
99
"license": "MIT",
@@ -21,12 +21,16 @@
2121
"package.json"
2222
],
2323
"dependencies": {
24-
"jquery": "1.9.0 - 2.0.3",
25-
"medium-editor": "~1.9"
24+
"jquery": ">=1.9.0",
25+
"medium-editor": "~2.3.0",
26+
"handlebars": "~2.0.0",
27+
"blueimp-file-upload": "~9.9.0",
28+
"jquery-sortable": "~0.9.12"
2629
},
2730
"devDependencies": {
28-
"qunit": "~1.12.0",
29-
"sinon": "~1.7.0",
30-
"sinon-qunit": "~1.0.0"
31+
"qunit": "~1.17.1",
32+
"sinon": "~1.12.1",
33+
"sinon-qunit": "~2.0.0",
34+
"jquery-cycle2": "~2.1.6"
3135
}
3236
}

0 commit comments

Comments
 (0)