justtal / ember-cli-sass-pods Goto Github PK
View Code? Open in Web Editor NEWEmber cli sass generator
License: MIT License
Ember cli sass generator
License: MIT License
Hey, looks like you guys might be interested in: https://github.com/ebryn/ember-component-css
We're pretty close to landing SASS support and could use some help rather than have several projects that do roughly the same thing.
Hi. May I ask what is the context of "podModulePrefix deprecated" (in README.md - The import file)?
is it deprecated in ember-cli? or its use in importing in ember-cli-sass-pods?
Amongst other reasons, outdated versions of ember-cli-babel use an outdated version of ember-cli-version-checker which causes a deprecation warning (the same one noted in adopted-ember-addons/ember-cli-sass#174)
Great project! I just forked it and added explicit support to generate .sass files instead of .scss files.
For example, both of the following are supported:
ember g sass components/contact-box -p
ember g scss components/contact-box -p
What are your thoughts on incorporating that feature into this repo (ember-cli-sass-pods)?
version: 2.4.2
node: 5.7.1
os: darwin x64
app/styles/
โโโ app.scss
โโโ pods.scss
Importing pods into app and ...test/style
into pods.
app/pods/components/
โโโ test
โโโ component.js
โโโ style.scss
โโโ template.hbs
//ember-cli-build.js
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
sassOptions: {
includedPaths: ['app']
}
});
I've also tried includedPaths: ['app/pods']
and globbing. Thanks!
When I run the example from the README
ember g style components/contact-box -p
The taskOptions
contains {"pod":false}
If I omit the -p
the opposite happens
The taskOptions
contains {"pod":true}
Not sure if this is an ember-cli issue rather than an ember-cli-sass-pods issue
When I run the generate command, the line added to pods.scss
is:
@import "pods/...thing-that-im-podding";
But it only works if I change it to:
@import "app/pods/...thing-that-im-podding";
Along with my stack info below, I'm using ember-cli-sass-pods 1.0.9
-------------------------------
Ember : 1.13.3
Ember Data : 1.0.0-beta.18
Firebase : 2.2.7
EmberFire : 1.4.7
jQuery : 1.11.3
Ember Simple Auth : 0.8.0
-------------------------------
Is it possible to have the pods.scss file auto-generated? sass-pods is great except...
ember g style long/path/to/my/nested/component
.style.scss
file manually, it doesn't get picked up. I have to add it to pods.scss
myself.pods.scss
isn't any different than manually adding it to app.scss
.style.scss
file manually I get a build error until I also remove the reference from pods.scss
. It makes sense...but I'm trying to be lazy here!Based on #2 there appears to be collaboration with ember-component-css. I'm not interested in some of the magic in Ember-component-css. However, I'm interested in using build hooks to auto-generate the @import 'pods/...'
declarations.
Is this on the roadmap?
I've added a style.scss
file to each of my component pods. When I save styles within /app/styles
the CSS is successfully compiled, including the component pod styles. However when I save the styles /app/components/pod-name
no compilation happens...
This is quiet crucial. Is this possible?
app/components/product-row/template.hbs
app/components/product-row/component.js
app/components/product-row/styles.scss
app/styles/app.scss >>> @import "pods";
app/styles/pod.scss >>> @import "app/components/product-row/style";
Using ember generate style component/name --dry-run
incorrectly results in an @import
statement for the new style being added to the pods.scss
file.
After upgrading to 1.1.0, the commit history says "Remove the need for includePath configuration.", but after I removed the configuration, changes to stylesheets in pods folders didn't get recompiled while the server is running, even when the file change is detected by watchman and the server.
Adding back "includePaths" option solves the problem. I'm not sure if this is a bug or am I missing something here?
attempting to generate a new stylesheet throws with the following error:
Cannot read property '__path__' of undefined
TypeError: Cannot read property '__path__' of undefined
at Class.module.exports.beforeInstall (/my/project/path/node_modules/ember-cli-sass-pods/blueprints/style/index.js:12:51)
...snip!
Running ember-cli 2.4.3
You should remove the import in pods.scss on delete
When trying to generate a styles file into one of my nested pods folder I get the below error. The file is successfully created, however it seems to be having some strange behavior when trying to add the import path.
$ ember g style apps/index
version: 2.4.2
installing style
create app\pods\apps\index\style.scss
ENOENT: no such file or directory, open 'c:\Users\Ryan\documents\repos\composer\app\styles\pods\apps\index.scss'
Error: ENOENT: no such file or directory, open 'c:\Users\Ryan\documents\repos\composer\app\styles\pods\apps\index.scss'
at Error (native)
at Object.fs.openSync (evalmachine.<anonymous>:584:18)
at Object.fs.writeFileSync (evalmachine.<anonymous>:1224:33)
at addScssToImportFile (c:\Users\Ryan\documents\repos\composer\node_modules\ember-cli-sass-pods\blueprints\style\index.js:52:14)
at Class.module.exports.afterInstall (c:\Users\Ryan\documents\repos\composer\node_modules\ember-cli-sass-pods\blueprints\style\index.js:31:7)
at lib$rsvp$$internal$$tryCatch (c:\Users\Ryan\documents\repos\composer\node_modules\rsvp\dist\rsvp.js:493:16)
at lib$rsvp$$internal$$invokeCallback (c:\Users\Ryan\documents\repos\composer\node_modules\rsvp\dist\rsvp.js:505:17)
at lib$rsvp$$internal$$publish (c:\Users\Ryan\documents\repos\composer\node_modules\rsvp\dist\rsvp.js:476:11)
at lib$rsvp$asap$$flush (c:\Users\Ryan\documents\repos\composer\node_modules\rsvp\dist\rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:453:9)
With just some simple logging, I noticed really weird stuff depending on where I was trying to create the file. If I was trying to put it in pods/apps, then options.podsDir would be equal to 'pods' however if I added anymore to the file path, it is no longer pods and instead starts trying to find a file like app/styles/<end nested folder>.scss
function addScssToImportFile (name, options) {
var importFile = options.podsDir ? options.podsDir.replace(/(\\|\/)$/, '') : 'pods',
filePath = path.join(options.root, 'app/styles'),
importScssPath = path.join(filePath, importFile + '.scss'),
podsDir = options.podsDir ? importFile + '/' : '',
newLine = '@import "app/' + podsDir + options.name + '/style";\n',
source;
if (!fs.existsSync(filePath)) {
mkdirp(filePath);
}
console.log("DEBUG######### " + importFile);
if (!fs.existsSync(importScssPath)) {
fs.writeFileSync(importScssPath, newLine, 'utf8');
} else {
source = fs.readFileSync(importScssPath, 'utf-8');
source += newLine;
fs.writeFileSync(importScssPath, source);
}
}
Has anyone every encountered this before? Maybe I set something up incorrectly. For reference I have usePods: true
as well as podModulePrefix: composer/pods
.
As the last commit is from 2016, and some deprecation started to appear, I'm asking to anyone :
Is this project still maintained ?
Does someone plaine to fork it ?
When the generator is run in an addon folder the scss files should go in addon/
, not app/
And pods.scss
should be in addon/styles
And docs should read
Watched folder
Add paths for watching in the 'ember.cli-build.js':
var app = new EmberApp(defaults, {
sassOptions: {
includePaths: ['app', 'addon']
}
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.