Skip to content

ported the examples to local-by-default #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"postcss": "^4.1.11",
"postcss-modules-extract-imports": "0.0.1",
"postcss-modules-local-by-default": "0.0.6",
"postcss-modules-local-by-default": "0.0.7",
"postcss-modules-scope": "0.0.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

// The default set of plugins
plugins: [
//localByDefault,
localByDefault,
extractImports,
scope
],
Expand Down
3 changes: 2 additions & 1 deletion test/test-cases/simple-export/expected.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.__globalName {

._simple_export_source__localName {
color: red;
}
2 changes: 1 addition & 1 deletion test/test-cases/simple-export/expected.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"localName": "__globalName __otherName"
"localName": "_simple_export_source__localName"
}
6 changes: 1 addition & 5 deletions test/test-cases/simple-export/source.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
:export {
localName: __globalName __otherName;
}

.__globalName {
.localName {
color: red;
}
6 changes: 1 addition & 5 deletions test/test-cases/single-import-export/colors.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
:export {
blackShadow: __global_blackShadow;
}

.__global_blackShadow {
.blackShadow {
box-shadow: 0 0 10px -2px black;
}
6 changes: 4 additions & 2 deletions test/test-cases/single-import-export/expected.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.__global_blackShadow {

._single_import_export_colors__blackShadow {
box-shadow: 0 0 10px -2px black;
}
.__globalName {

._single_import_export_source__localName {
color: red;
}
2 changes: 1 addition & 1 deletion test/test-cases/single-import-export/expected.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"localName": "__globalName __global_blackShadow"
"localName": "_single_import_export_source__localName _single_import_export_colors__blackShadow"
}
11 changes: 2 additions & 9 deletions test/test-cases/single-import-export/source.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
:import("./colors.css") {
blackShadow: __tmp_blackShadow;
}

:export {
localName: __globalName __tmp_blackShadow;
}

.__globalName {
.localName {
extends: blackShadow from "./colors.css";
color: red;
}