var path = require('path');
var nearestPackageRoot = require('./nearest-package-root');

module.exports = Package;

function Package(rootPath) {
    this.root = path.join.bind(null, rootPath);
    this.JSON = require(this.root('package.json'));
};

Package.prototype.fullPathToEntrypoint = function fullPathToEntrypoint() {
    return this.root(this.entrypoint());
};

Package.prototype.entrypoint = function entrypoint() {
    if (this.JSON.sass) {
        return this.JSON.sass;
    // look for "style" declaration in package.json
    } else if (this.JSON.style) {
        return this.JSON.style;
    // look for a css/sass/scss file in the "main" declaration in package.json
    } else if (/\.(sa|c|sc)ss$/.test(this.JSON.main)) {
        return this.JSON.main;
    // otherwise assume ./styles.scss
    } else {
        return 'styles';
    }
};

@@ -592,16 +592,137 @@
 .style;%0A
+    // look for %22styles%22 declaration in package.json%0A    %7D else if (this.JSON.styles) %7B%0A        return this.JSON.styles;%0A
     // l

Read `styles` property from package.json