Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
0c709c1e
Commit
0c709c1e
authored
Sep 07, 2016
by
Nick Schonning
Committed by
GitHub
Sep 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1700 from nschonni/eslint-updates
ESLint 3.x updates
parents
6dda1ded
05105ad3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
16 deletions
+24
-16
.eslintrc.json
.eslintrc.json
+7
-1
.jshintignore
.jshintignore
+0
-2
.travis.yml
.travis.yml
+3
-1
node-sass
bin/node-sass
+11
-9
package.json
package.json
+1
-1
api.js
test/api.js
+2
-2
No files found.
.eslintrc
→
.eslintrc
.json
View file @
0c709c1e
...
...
@@ -3,6 +3,7 @@
"node"
:
true
},
"globals"
:
{},
"extends"
:
"eslint:recommended"
,
"rules"
:
{
"no-bitwise"
:
2
,
"camelcase"
:
0
,
...
...
@@ -35,6 +36,11 @@
],
"strict"
:
0
,
"no-undef"
:
2
,
"no-unused-vars": 2
"no-unused-vars"
:
2
,
"semi"
:
2
,
"no-extra-semi"
:
2
,
"no-redeclare"
:
2
,
"block-scoped-var"
:
2
,
"no-console"
:
0
}
}
.jshintignore
deleted
100644 → 0
View file @
6dda1ded
node_modules/**
test/coverage/html
.travis.yml
View file @
0c709c1e
...
...
@@ -46,11 +46,13 @@ before_install:
script
:
-
npm install
-
if [ $TRAVIS_OS_NAME == "linux" ] && [ $TRAVIS_NODE_VERSION == "4" ]; then
npm run lint || exit 1;
fi
-
npm test
after_success
:
-
if [ $TRAVIS_OS_NAME == "linux" ] && [ $TRAVIS_NODE_VERSION == "4" ]; then
npm run lint;
npm run-script coverage;
fi
...
...
bin/node-sass
View file @
0c709c1e
...
...
@@ -182,6 +182,7 @@ function getEmitter() {
*/
function
getOptions
(
args
,
options
)
{
var
cssDir
,
sassDir
,
file
,
mapDir
;
options
.
src
=
args
[
0
];
if
(
args
[
1
])
{
...
...
@@ -193,9 +194,9 @@ function getOptions(args, options) {
}
if
(
options
.
directory
)
{
var
sassDir
=
path
.
resolve
(
options
.
directory
);
var
file
=
path
.
relative
(
sassDir
,
args
[
0
]);
var
cssDir
=
path
.
resolve
(
options
.
output
);
sassDir
=
path
.
resolve
(
options
.
directory
);
file
=
path
.
relative
(
sassDir
,
args
[
0
]);
cssDir
=
path
.
resolve
(
options
.
output
);
options
.
dest
=
path
.
join
(
cssDir
,
file
).
replace
(
path
.
extname
(
file
),
'.css'
);
}
...
...
@@ -215,9 +216,9 @@ function getOptions(args, options) {
if
(
!
options
.
directory
)
{
options
.
sourceMap
=
path
.
resolve
(
options
.
sourceMapOriginal
,
path
.
basename
(
options
.
dest
)
+
'.map'
);
}
else
{
var
sassDir
=
path
.
resolve
(
options
.
directory
);
var
file
=
path
.
relative
(
sassDir
,
args
[
0
]);
var
mapDir
=
path
.
resolve
(
options
.
sourceMapOriginal
);
sassDir
=
path
.
resolve
(
options
.
directory
);
file
=
path
.
relative
(
sassDir
,
args
[
0
]);
mapDir
=
path
.
resolve
(
options
.
sourceMapOriginal
);
options
.
sourceMap
=
path
.
join
(
mapDir
,
file
).
replace
(
path
.
extname
(
file
),
'.css.map'
);
}
}
...
...
@@ -236,19 +237,20 @@ function getOptions(args, options) {
function
watch
(
options
,
emitter
)
{
var
buildGraph
=
function
(
options
)
{
var
graph
;
var
graphOptions
=
{
loadPaths
:
options
.
includePath
,
extensions
:
[
'scss'
,
'sass'
,
'css'
]
};
if
(
options
.
directory
)
{
var
graph
=
grapher
.
parseDir
(
options
.
directory
,
graphOptions
);
graph
=
grapher
.
parseDir
(
options
.
directory
,
graphOptions
);
}
else
{
var
graph
=
grapher
.
parseFile
(
options
.
src
,
graphOptions
);
graph
=
grapher
.
parseFile
(
options
.
src
,
graphOptions
);
}
return
graph
;
}
}
;
var
watch
=
[];
var
graph
=
buildGraph
(
options
);
...
...
package.json
View file @
0c709c1e
...
...
@@ -70,7 +70,7 @@
},
"devDependencies"
:
{
"
coveralls
"
:
"^2.11.8"
,
"
eslint
"
:
"^
2.9
.0"
,
"
eslint
"
:
"^
3.4
.0"
,
"
istanbul
"
:
"^0.4.2"
,
"
mocha
"
:
"^2.4.5"
,
"
mocha-lcov-reporter
"
:
"^1.2.0"
,
...
...
test/api.js
View file @
0c709c1e
...
...
@@ -147,7 +147,7 @@ describe('api', function() {
var
expectedRed
=
read
(
fixture
(
'sass-path/expected-red.css'
),
'utf8'
).
trim
();
var
expectedOrange
=
read
(
fixture
(
'sass-path/expected-orange.css'
),
'utf8'
).
trim
();
envIncludes
=
[
var
envIncludes
=
[
fixture
(
'sass-path/red'
),
fixture
(
'sass-path/orange'
)
];
...
...
@@ -175,7 +175,7 @@ describe('api', function() {
var
expectedRed
=
read
(
fixture
(
'sass-path/expected-red.css'
),
'utf8'
).
trim
();
var
expectedOrange
=
read
(
fixture
(
'sass-path/expected-orange.css'
),
'utf8'
).
trim
();
envIncludes
=
[
var
envIncludes
=
[
fixture
(
'sass-path/red'
)
];
process
.
env
.
SASS_PATH
=
envIncludes
.
join
(
path
.
delimiter
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment