Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Watch mode watches its own output recursively if output directory descends from the input directory. #2184

Closed
shirakaba opened this issue Dec 12, 2017 · 1 comment

Comments

@shirakaba
Copy link

shirakaba commented Dec 12, 2017

Minimum reproduction

Module.scss:

.moduleStyle {
    opacity: 1;
}
node_modules/.bin/node-sass --watch src/scss --output src/scss/css_prebuild

Behaviour

In watch mode, it emits to src/scss/css_prebuild, then emits again to src/scss/css_prebuild/css_prebuild. This may happen recursively (albeit limited to one level by some safety factor).

my-mac:myProject me$ node_modules/.bin/node-sass --watch src/scss --output src/scss/css_prebuild
=> changed: /Users/me/Sites/myProject/src/scss/video.scss
Rendering Complete, saving .css file...
Wrote CSS to /Users/me/Sites/myProject/src/scss/css_prebuild/video.css
=> changed: /Users/me/Sites/myProject/src/scss/css_prebuild/video.css
Rendering Complete, saving .css file...
Wrote CSS to /Users/me/Sites/myProject/src/scss/css_prebuild/css_prebuild/video.css

Proposal

Two options:

  • --watch mode should not default to adding the --recursive flag.

  • There should be a way to exclude paths or ignore directories, and the output directory should be implicitly ignored.

Configuration

  • NPM version (npm -v): 5.4.2
  • Node version (node -v): 8.7.0
  • Node Process (node -p process.versions):
{ http_parser: '2.7.0',
  node: '8.7.0',
  v8: '6.1.534.42',
  uv: '1.15.0',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  modules: '57',
  nghttp2: '1.25.0',
  openssl: '1.0.2l',
  icu: '59.1',
  unicode: '9.0',
  cldr: '31.0.1',
  tz: '2017b' }
  • Node Platform (node -p process.platform): darwin
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
node-sass	4.7.2	(Wrapper)	[JavaScript]
libsass  	3.5.0.beta.2	(Sass Compiler)	[C/C++]
  • npm node-sass versions (npm ls node-sass):
myProject@1.0.0 /Users/me/Sites/myProject
└── node-sass@4.7.2 
@xzyfer
Copy link
Contributor

xzyfer commented Dec 12, 2017 via email

@xzyfer xzyfer closed this as completed Dec 12, 2017
xzyfer added a commit that referenced this issue Apr 16, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
nschonni pushed a commit to nschonni/node-sass that referenced this issue Jul 9, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See sass#2184
See sass#2006
See sass#1933
See sass#1925
See sass#1867
See sass#1845
xzyfer added a commit that referenced this issue Jul 16, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Jul 16, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 7, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 7, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 7, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 8, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Mar 21, 2020
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
saper pushed a commit to saper/node-sass that referenced this issue May 17, 2020
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See sass#2184
See sass#2006
See sass#1933
See sass#1925
See sass#1867
See sass#1845
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants