Code Monkey home page Code Monkey logo

ember-cli-sass-pods's Introduction

Hi there ๐Ÿ‘‹

ember-cli-sass-pods's People

Contributors

bwittenbrook3 avatar elwayman02 avatar ember-tomster avatar geymed avatar justtal avatar matthewconstantine avatar mohtada-h avatar patrickng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ember-cli-sass-pods's Issues

File naming and sourcemaps problem.

At first many thanks for this handy plugin, it eased my pain.

But There is small issue when debugging with sourcemaps,
screenshot 2015-07-08 14 50 01

When all files named style.scss it is hard to understand from where current styles are coming from.

May be there is some solution for this?

auto-magic pods.scss management

Is it possible to have the pods.scss file auto-generated? sass-pods is great except...

  • Typing the full path is tedious: ember g style long/path/to/my/nested/component.
  • If I create the style.scss file manually, it doesn't get picked up. I have to add it to pods.scss myself.
  • Manually adding a path to pods.scss isn't any different than manually adding it to app.scss.
  • If I delete a 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?

component styles are not watched?

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";

--pod doesn't work if pods enabled

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

Pods file does not get recompiled if includePaths is not specified

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 style with latest ember-cli throws

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

.sass support

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)?

podModulePrefix deprecated

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?

ember d style

You should remove the import in pods.scss on delete

Is this project still ongoing ?

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 ?

Scss is not reloaded until the server is restarted

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!

if run in an addon it puts styles in app folder instead of addon

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']
  }
});

Strange Behavior with Nested File Paths

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.

Generated style breaks imports

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
-------------------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.