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
05105ad3
Commit
05105ad3
authored
Sep 06, 2016
by
Nick Schonning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump ESLint to 3.x and fix errors
parent
fb199177
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
15 deletions
+21
-15
.eslintrc.json
.eslintrc.json
+7
-1
.jshintignore
.jshintignore
+0
-2
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 @
05105ad3
...
...
@@ -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 @
fb199177
node_modules/**
test/coverage/html
bin/node-sass
View file @
05105ad3
...
...
@@ -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 @
05105ad3
...
...
@@ -71,7 +71,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 @
05105ad3
...
...
@@ -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