mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-04 10:28:46 +08:00
add(specs): +101 specs and 403 assertions from Atom
This commit is contained in:
parent
2b324c4533
commit
f0f4df6714
116 changed files with 315 additions and 216 deletions
|
@ -6,7 +6,7 @@ LessCache = require 'less-cache'
|
|||
module.exports = (grunt) ->
|
||||
grunt.registerMultiTask 'prebuild-less', 'Prebuild cached of compiled LESS files', ->
|
||||
prebuiltConfigurations = [
|
||||
['light-ui']
|
||||
['ui-light', 'ui-dark']
|
||||
]
|
||||
|
||||
directory = path.join(grunt.config.get('atom.appDir'), 'less-compile-cache')
|
||||
|
@ -19,7 +19,7 @@ module.exports = (grunt) ->
|
|||
themePath = path.resolve('node_modules', theme)
|
||||
if fs.existsSync(themePath) is false
|
||||
themePath = path.resolve('internal_packages', theme)
|
||||
|
||||
|
||||
if fs.existsSync(path.join(themePath, 'stylesheets'))
|
||||
stylesheetsDir = path.join(themePath, 'stylesheets')
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'global':
|
||||
'core':
|
||||
'themes': [
|
||||
'light-ui'
|
||||
'ui-light'
|
||||
]
|
||||
'disabledPackages': [
|
||||
"calendar-bar",
|
||||
|
|
11
internal_packages/ui-dark/package.json
Normal file
11
internal_packages/ui-dark/package.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "ui-dark",
|
||||
"theme": "ui",
|
||||
"version": "0.1.0",
|
||||
"description": "The Dark Nylas Mail Client Theme",
|
||||
"license": "Proprietary",
|
||||
"engines": {
|
||||
"atom": "*"
|
||||
},
|
||||
"private": true
|
||||
}
|
1
internal_packages/ui-light/CONTRIBUTING.md
Normal file
1
internal_packages/ui-light/CONTRIBUTING.md
Normal file
|
@ -0,0 +1 @@
|
|||
See the [Atom contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md)
|
20
internal_packages/ui-light/LICENSE.md
Normal file
20
internal_packages/ui-light/LICENSE.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
Copyright (c) 2014 GitHub Inc.
|
||||
|
||||
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.
|
9
internal_packages/ui-light/README.md
Normal file
9
internal_packages/ui-light/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Atom Light UI theme
|
||||
|
||||
Default light UI theme for Atom.
|
||||
|
||||
This theme is installed by default with Atom and can be activated by going to
|
||||
the _Themes_ section in the Settings view (`cmd-,`) and selecting it from the
|
||||
_UI Themes_ drop-down menu.
|
||||
|
||||

|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "light-ui",
|
||||
"name": "ui-light",
|
||||
"theme": "ui",
|
||||
"version": "0.1.0",
|
||||
"description": "The Nylas Mail Client Theme",
|
5
spec-nylas/fixtures/css.css
Normal file
5
spec-nylas/fixtures/css.css
Normal file
|
@ -0,0 +1,5 @@
|
|||
body {
|
||||
font-size: 1234px;
|
||||
width: 110%;
|
||||
font-weight: bold !important;
|
||||
}
|
3
spec-nylas/fixtures/module-cache/file.json
Normal file
3
spec-nylas/fixtures/module-cache/file.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"foo": "bar"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"theme": "ui",
|
||||
"styleSheets": ["editor.less"]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
@import "ui-variables";
|
||||
|
||||
atom-text-editor {
|
||||
padding-top: @component-padding;
|
||||
padding-right: @component-padding;
|
||||
padding-bottom: @component-padding;
|
||||
|
||||
color: @input-background-color;
|
||||
background-color: @spec-test-variable; // From the fallback variables, not overridden
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
// This does not contain all of the ui-variables available.
|
||||
@background-primary: #00f; // Changed
|
0
spec/fixtures/packages/theme-with-index-css/index.css → spec-nylas/fixtures/packages/theme-with-index-css/index.css
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-css/index.css → spec-nylas/fixtures/packages/theme-with-index-css/index.css
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-css/package.json → spec-nylas/fixtures/packages/theme-with-index-css/package.json
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-css/package.json → spec-nylas/fixtures/packages/theme-with-index-css/package.json
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-less/index.less → spec-nylas/fixtures/packages/theme-with-index-less/index.less
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-less/index.less → spec-nylas/fixtures/packages/theme-with-index-less/index.less
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-less/package.json → spec-nylas/fixtures/packages/theme-with-index-less/package.json
Normal file → Executable file
0
spec/fixtures/packages/theme-with-index-less/package.json → spec-nylas/fixtures/packages/theme-with-index-less/package.json
Normal file → Executable file
1
spec-nylas/fixtures/packages/theme-with-invalid-styles/index.less
Executable file
1
spec-nylas/fixtures/packages/theme-with-invalid-styles/index.less
Executable file
|
@ -0,0 +1 @@
|
|||
<>
|
4
spec-nylas/fixtures/packages/theme-with-invalid-styles/package.json
Executable file
4
spec-nylas/fixtures/packages/theme-with-invalid-styles/package.json
Executable file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "theme-with-invalid-styles",
|
||||
"theme": "ui"
|
||||
}
|
0
spec/fixtures/packages/theme-with-package-file/package.json → spec-nylas/fixtures/packages/theme-with-package-file/package.json
Normal file → Executable file
0
spec/fixtures/packages/theme-with-package-file/package.json → spec-nylas/fixtures/packages/theme-with-package-file/package.json
Normal file → Executable file
4
spec-nylas/fixtures/packages/theme-with-ui-variables/package.json
Executable file
4
spec-nylas/fixtures/packages/theme-with-ui-variables/package.json
Executable file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"theme": "ui",
|
||||
"styleSheets": ["editor.less"]
|
||||
}
|
9
spec-nylas/fixtures/packages/theme-with-ui-variables/styles/editor.less
Executable file
9
spec-nylas/fixtures/packages/theme-with-ui-variables/styles/editor.less
Executable file
|
@ -0,0 +1,9 @@
|
|||
@import "ui-variables";
|
||||
|
||||
atom-text-editor {
|
||||
padding-top: @component-padding;
|
||||
padding-right: @component-padding;
|
||||
padding-bottom: @component-padding;
|
||||
|
||||
color: @input-background-color;
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
// Variables different from the original are marked 'Changed'
|
||||
|
||||
@text-color: #333;
|
||||
@text-color-subtle: #777;
|
||||
@text-color-highlight: #111;
|
||||
@text-color-selected: @text-color-highlight;
|
||||
|
||||
@text-color-info: #5293d8;
|
||||
@text-color-success: #1fe977;
|
||||
@text-color-warning: #f78a46;
|
||||
@text-color-error: #c00;
|
||||
|
||||
@background-color-info: #0098ff;
|
||||
@background-color-success: #17ca65;
|
||||
@background-color-warning: #ff4800;
|
||||
@background-color-error: #c00;
|
||||
@background-color-highlight: rgba(255, 255, 255, 0.10);
|
||||
@background-color-selected: @background-color-highlight;
|
||||
|
||||
@background-primary: #00f; // Changed
|
||||
|
||||
@base-background-color: #fff;
|
||||
@base-border-color: #eee;
|
||||
|
||||
@pane-item-background-color: @base-background-color;
|
||||
@pane-item-border-color: @base-border-color;
|
||||
|
||||
@input-background-color: #f00; // Changed
|
||||
@input-border-color: @base-border-color;
|
||||
|
||||
@tool-panel-background-color: #f4f4f4;
|
||||
@tool-panel-border-color: @base-border-color;
|
||||
|
||||
@inset-panel-background-color: #eee;
|
||||
@inset-panel-border-color: @base-border-color;
|
||||
|
||||
@panel-heading-background-color: #ddd;
|
||||
@panel-heading-border-color: transparent;
|
||||
|
||||
@overlay-background-color: #f4f4f4;
|
||||
@overlay-border-color: @base-border-color;
|
||||
|
||||
@button-background-color: #ccc;
|
||||
@button-background-color-hover: lighten(@button-background-color, 5%);
|
||||
@button-background-color-selected: @button-background-color-hover;
|
||||
@button-border-color: #aaa;
|
||||
|
||||
@tab-bar-background-color: #fff;
|
||||
@tab-bar-border-color: darken(@tab-background-color-active, 10%);
|
||||
@tab-background-color: #f4f4f4;
|
||||
@tab-background-color-active: #fff;
|
||||
@tab-border-color: @base-border-color;
|
||||
|
||||
@tree-view-background-color: @tool-panel-background-color;
|
||||
@tree-view-border-color: @tool-panel-border-color;
|
||||
|
||||
@ui-site-color-1: @background-color-success; // green
|
||||
@ui-site-color-2: @background-color-info; // blue
|
||||
@ui-site-color-3: @background-color-warning; // orange
|
||||
@ui-site-color-4: #db2ff4; // purple
|
||||
@ui-site-color-5: #f5e11d; // yellow
|
||||
|
||||
@font-size: 12px;
|
||||
|
||||
@disclosure-arrow-size: 12px;
|
||||
|
||||
@component-padding: 150px;
|
||||
@component-icon-padding: 5px;
|
||||
@component-icon-size: 16px;
|
||||
@component-line-height: 25px;
|
||||
@component-border-radius: 2px;
|
||||
|
||||
@tab-height: 30px;
|
||||
|
||||
@font-family: Arial;
|
8
spec-nylas/fixtures/sample.less
Normal file
8
spec-nylas/fixtures/sample.less
Normal file
|
@ -0,0 +1,8 @@
|
|||
@color: #4D926F;
|
||||
|
||||
#header {
|
||||
color: @color;
|
||||
}
|
||||
h2 {
|
||||
color: @color;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue