Skip to content
Permalink
Browse files

Merge pull request #11875 from atom/sm-move-bootstrap-to-npm

Merge Bootstrap + Core styles

Closes #11839 
Closes #11858
  • Loading branch information...
thomasjo committed Jun 24, 2016
2 parents 511587c + b2f7c9d commit 35ceb66a5b0247c0d8b4739003f7cac472064f23
@@ -59,12 +59,6 @@ module.exports = (grunt) ->
path.join('ohnogit', 'node_modules', 'nodegit', 'node_modules', '.bin') path.join('ohnogit', 'node_modules', 'nodegit', 'node_modules', '.bin')
path.join('oniguruma', 'deps') path.join('oniguruma', 'deps')
path.join('less', 'dist') path.join('less', 'dist')
path.join('bootstrap', 'docs')
path.join('bootstrap', 'dist')
path.join('bootstrap', 'fonts')
path.join('bootstrap', '_config.yml')
path.join('bootstrap', '_includes')
path.join('bootstrap', '_layouts')
path.join('npm', 'doc') path.join('npm', 'doc')
path.join('npm', 'html') path.join('npm', 'html')
path.join('npm', 'man') path.join('npm', 'man')
@@ -8,33 +8,13 @@ module.exports = (grunt) ->
cacheMisses = 0 cacheMisses = 0
cacheHits = 0 cacheHits = 0


compileBootstrap = ->
appDir = grunt.config.get('atom.appDir')
bootstrapLessPath = path.join(appDir, 'static', 'bootstrap.less')
bootstrapCssPath = path.join(appDir, 'static', 'bootstrap.css')

lessCache = new LessCache
cacheDir: temp.mkdirSync('atom-less-cache')
fallbackDir: grunt.config.get('prebuild-less.options.cachePath')
syncCaches: true
resourcePath: path.resolve('.')

bootstrapCss = lessCache.readFileSync(bootstrapLessPath)
grunt.file.write(bootstrapCssPath, bootstrapCss)
rm(bootstrapLessPath)
rm(path.join(appDir, 'node_modules', 'bootstrap', 'less'))
cacheMisses += lessCache.stats.misses
cacheHits += lessCache.stats.hits

importFallbackVariables = (lessFilePath) -> importFallbackVariables = (lessFilePath) ->
if lessFilePath.indexOf('static') is 0 if lessFilePath.indexOf('static') is 0
false false
else else
true true


grunt.registerMultiTask 'prebuild-less', 'Prebuild cached of compiled Less files', -> grunt.registerMultiTask 'prebuild-less', 'Prebuild cached of compiled Less files', ->
compileBootstrap()

uiThemes = [ uiThemes = [
'atom-dark-ui' 'atom-dark-ui'
'atom-light-ui' 'atom-light-ui'
@@ -16,8 +16,8 @@
"dependencies": { "dependencies": {
"async": "0.2.6", "async": "0.2.6",
"atom-keymap": "6.3.2", "atom-keymap": "6.3.2",
"atom-ui": "0.3.1",
"babel-core": "^5.8.21", "babel-core": "^5.8.21",
"bootstrap": "^3.3.4",
"cached-run-in-this-context": "0.4.1", "cached-run-in-this-context": "0.4.1",
"chai": "3.5.0", "chai": "3.5.0",
"clear-cut": "^2.0.1", "clear-cut": "^2.0.1",
@@ -170,7 +170,6 @@ class ThemeManager
@userStyleSheetDisposable = @styleManager.addStyleSheet(userStylesheetContents, sourcePath: userStylesheetPath, priority: 2) @userStyleSheetDisposable = @styleManager.addStyleSheet(userStylesheetContents, sourcePath: userStylesheetPath, priority: 2)


loadBaseStylesheets: -> loadBaseStylesheets: ->
@requireStylesheet('../static/bootstrap')
@reloadBaseStylesheets() @reloadBaseStylesheets()


reloadBaseStylesheets: -> reloadBaseStylesheets: ->
@@ -6,26 +6,22 @@
@import "./variables/ui-variables"; @import "./variables/ui-variables";
@import "ui-variables"; @import "ui-variables";


// Octicons
@import "octicon-utf-codes"; @import "octicon-utf-codes";
@import "octicon-mixins"; @import "octicon-mixins";
@import "octicons";


@import "workspace-view"; // Normalize + scaffolding
@import "bootstrap-overrides"; @import "normalize";
@import "badges"; @import "scaffolding";
@import "buttons";
@import "icons"; // Core components
@import "links"; @import "cursors";
@import "panes";
@import "panels"; @import "panels";
@import "sections"; @import "panes";
@import "lists";
@import "popover-list";
@import "messages";
@import "markdown";
@import "text-editor-light";
@import "select-list";
@import "syntax"; @import "syntax";
@import "text"; @import "text-editor-light";
@import "utilities"; @import "workspace-view";
@import "octicons";
@import "cursors"; // Atom UI library
@import "../node_modules/atom-ui/atom-ui.less";

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 35ceb66

Please sign in to comment.
You can’t perform that action at this time.