Skip to content

Commit

Permalink
Moving tiny stylesheet into source code
Browse files Browse the repository at this point in the history
This makes loading the LWP from a CDN easier
  • Loading branch information
nathancarter committed Oct 26, 2017
1 parent 46be859 commit 070abb9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
8 changes: 1 addition & 7 deletions gulpfile.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,16 @@ point to files that exist) and another for compiling.
]
The final task is that of building a release, which includes all the tasks
above, plus one for copying all `source/assets` into the release folder,
and one for copying all style files used by plugins into the release folder.
above, plus one for copying all `source/assets` into the release folder.

gulp.task 'copy-assets', -> pump [
gulp.src [ 'source/assets/**/*', '!source/assets/README.md' ]
gulp.dest 'release'
]
gulp.task 'copy-styles', -> pump [
gulp.src 'source/plugins/*.css'
gulp.dest 'release'
]
gulp.task 'release-build', [
'lwp-build'
'aux-build'
'copy-assets'
'copy-styles'
]
## Other build tasks
Expand Down
2 changes: 1 addition & 1 deletion release/lurch-web-platform.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/lurch-web-platform.js.map

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion release/lurch-web-platform.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -3313,9 +3313,22 @@ the latter if needed.
The plugin, when initialized on an editor, places an instance of the
`Groups` class inside the editor, and points the class at that editor.

styleSheet = '
img.grouper {
margin-bottom : -0.35em;
cursor : default;
}
img.grouper.hide:not(.decorate) {
width : 0px;
height : 22px;
}
'
styleSheet = 'data:text/html;base64' + \
new Buffer( styleSheet ).toString 'base64'
tinymce.PluginManager.add 'groups', ( editor, url ) ->
editor.Groups = new Groups editor
editor.on 'init', ( event ) -> editor.dom.loadCSS 'groupsplugin.css'
editor.on 'init', ( event ) -> editor.dom.loadCSS styleSheet
for type in editor.settings.groupTypes
editor.Groups.addGroupType type.name, type
editor.addMenuItem 'hideshowgroups',
Expand Down
10 changes: 0 additions & 10 deletions source/plugins/groupsplugin.css

This file was deleted.

15 changes: 14 additions & 1 deletion source/plugins/groupsplugin.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -1654,9 +1654,22 @@ the latter if needed.
The plugin, when initialized on an editor, places an instance of the
`Groups` class inside the editor, and points the class at that editor.

styleSheet = '
img.grouper {
margin-bottom : -0.35em;
cursor : default;
}
img.grouper.hide:not(.decorate) {
width : 0px;
height : 22px;
}
'
styleSheet = 'data:text/html;base64' + \
new Buffer( styleSheet ).toString 'base64'
tinymce.PluginManager.add 'groups', ( editor, url ) ->
editor.Groups = new Groups editor
editor.on 'init', ( event ) -> editor.dom.loadCSS 'groupsplugin.css'
editor.on 'init', ( event ) -> editor.dom.loadCSS styleSheet
for type in editor.settings.groupTypes
editor.Groups.addGroupType type.name, type
editor.addMenuItem 'hideshowgroups',
Expand Down

0 comments on commit 070abb9

Please sign in to comment.