├── .gitignore ├── .travis.yml ├── .yarnrc ├── ARCHITECTURE.md ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── NOTICE.md ├── OLD_README.md ├── README.md ├── commitlint.config.js ├── css-blocks.code-workspace ├── greenkeeper.json ├── lerna.json ├── package.json ├── packages ├── @css-blocks │ ├── .gitignore │ ├── bem-to-blocks │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── configs │ │ │ ├── tslint.cli.json │ │ │ ├── tslint.interactive.json │ │ │ └── tslint.release.json │ │ ├── package.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── interface.ts │ │ │ ├── userInput.ts │ │ │ └── utils.ts │ │ ├── test │ │ │ ├── block-class-selector-test.ts │ │ │ ├── construct-blocks-map-test.ts │ │ │ ├── mocha.opts │ │ │ └── plugin-test.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── broccoli │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── Aggregate.ts │ │ │ ├── Analyze.ts │ │ │ ├── Transport.ts │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ ├── test │ │ │ ├── Aggregate.ts │ │ │ ├── Analyze.ts │ │ │ ├── Transport.ts │ │ │ └── mocha.opts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── cli │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── bin │ │ │ └── css-blocks │ │ ├── package.json │ │ ├── src │ │ │ ├── extract-lines-from-source.ts │ │ │ └── index.ts │ │ ├── test │ │ │ ├── TestCLI.ts │ │ │ ├── cli-test.ts │ │ │ ├── convert-test.ts │ │ │ ├── fixtures │ │ │ │ ├── .gitignore │ │ │ │ ├── basic │ │ │ │ │ ├── attribute-error.block.css │ │ │ │ │ ├── deep-transitive-error.block.css │ │ │ │ │ ├── error.block.css │ │ │ │ │ ├── simple.block.css │ │ │ │ │ └── transitive-error.block.css │ │ │ │ ├── config-file │ │ │ │ │ ├── css-blocks.config.json │ │ │ │ │ └── simple.block.scss │ │ │ │ ├── importing │ │ │ │ │ ├── alias.block.css │ │ │ │ │ ├── node_modules │ │ │ │ │ │ └── block-module │ │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ └── font.block.css │ │ │ │ │ │ │ ├── index.block.css │ │ │ │ │ │ │ └── package.json │ │ │ │ │ └── npm.block.css │ │ │ │ └── scss │ │ │ │ │ ├── another-error.block.scss │ │ │ │ │ ├── error.block.scss │ │ │ │ │ ├── missing-style.block.scss │ │ │ │ │ ├── mixins.scss │ │ │ │ │ ├── simple.block.scss │ │ │ │ │ └── tagname-error.block.scss │ │ │ ├── mocha.opts │ │ │ └── preprocessors.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── code-style │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── CHANGELOG.md │ │ ├── configs │ │ │ ├── tslint.cli.json │ │ │ ├── tslint.interactive.json │ │ │ └── tslint.release.json │ │ ├── package.json │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── config │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ └── index.ts │ │ ├── test │ │ │ ├── config-test.ts │ │ │ ├── fixtures │ │ │ │ ├── another-js-file │ │ │ │ │ └── css-blocks.config.js │ │ │ │ ├── from-js-file │ │ │ │ │ ├── blocks │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── css-blocks.config.js │ │ │ │ ├── from-json-file │ │ │ │ │ ├── config │ │ │ │ │ │ ├── importer.js │ │ │ │ │ │ └── preprocessors.js │ │ │ │ │ ├── css-blocks.config.json │ │ │ │ │ └── subdir │ │ │ │ │ │ └── another-subdir │ │ │ │ │ │ └── .gitkeep │ │ │ │ └── from-pkg-json │ │ │ │ │ ├── config │ │ │ │ │ └── preprocessors.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── subdir │ │ │ │ │ └── another-subdir │ │ │ │ │ └── .gitkeep │ │ │ └── mocha.opts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── core │ │ ├── .vscode │ │ │ ├── cSpell.json │ │ │ ├── launch.json │ │ │ ├── settings.json │ │ │ └── tasks.json │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── TEMPLATES.md │ │ ├── doc-src │ │ │ └── images │ │ │ │ └── css-terms.svg │ │ ├── package.json │ │ ├── src │ │ │ ├── Analyzer │ │ │ │ ├── Analysis.ts │ │ │ │ ├── Analyzer.ts │ │ │ │ ├── ElementAnalysis.ts │ │ │ │ ├── README.md │ │ │ │ ├── index.ts │ │ │ │ └── validations │ │ │ │ │ ├── Validator.ts │ │ │ │ │ ├── attribute-group-validator.ts │ │ │ │ │ ├── attribute-parent-validator.ts │ │ │ │ │ ├── class-pairs-validator.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── property-conflict-validator.ts │ │ │ │ │ └── root-class-validator.ts │ │ │ ├── BlockCompiler │ │ │ │ ├── BlockDefinitionCompiler │ │ │ │ │ ├── CompiledDefinitionMapper.ts │ │ │ │ │ ├── PostcssASTBuilder.ts │ │ │ │ │ ├── SelectorASTBuilder.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── ConflictResolver.ts │ │ │ │ ├── conflictDetection.ts │ │ │ │ └── index.ts │ │ │ ├── BlockParser │ │ │ │ ├── BlockFactory.ts │ │ │ │ ├── BlockFactoryBase.ts │ │ │ │ ├── BlockFactorySync.ts │ │ │ │ ├── BlockParser.ts │ │ │ │ ├── ast.ts │ │ │ │ ├── block-intermediates.ts │ │ │ │ ├── features │ │ │ │ │ ├── add-preset-selectors.ts │ │ │ │ │ ├── assert-foreign-global-attribute.ts │ │ │ │ │ ├── composes-block.ts │ │ │ │ │ ├── construct-block.ts │ │ │ │ │ ├── disallow-dfn-rules.ts │ │ │ │ │ ├── disallow-important.ts │ │ │ │ │ ├── discover-guid.ts │ │ │ │ │ ├── discover-name.ts │ │ │ │ │ ├── export-blocks.ts │ │ │ │ │ ├── extend-block.ts │ │ │ │ │ ├── global-attributes.ts │ │ │ │ │ ├── implement-block.ts │ │ │ │ │ ├── import-blocks.ts │ │ │ │ │ └── process-debug-statements.ts │ │ │ │ ├── index.ts │ │ │ │ ├── preprocessing.ts │ │ │ │ └── utils │ │ │ │ │ ├── blockNamesParser.ts │ │ │ │ │ ├── genGuid.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── stripQuotes.ts │ │ │ ├── BlockSyntax │ │ │ │ ├── BlockPath.ts │ │ │ │ ├── BlockSyntax.ts │ │ │ │ ├── index.ts │ │ │ │ └── parseBlockDebug.ts │ │ │ ├── BlockTree │ │ │ │ ├── AttrValue.ts │ │ │ │ ├── Attribute.ts │ │ │ │ ├── Block.ts │ │ │ │ ├── BlockClass.ts │ │ │ │ ├── Inheritable.ts │ │ │ │ ├── RulesetContainer.ts │ │ │ │ ├── Style.ts │ │ │ │ ├── Styles.ts │ │ │ │ └── index.ts │ │ │ ├── PrecompiledDefinitions │ │ │ │ ├── block-syntax-version.ts │ │ │ │ ├── compiled-comments.ts │ │ │ │ └── index.ts │ │ │ ├── SourceLocation.ts │ │ │ ├── TemplateRewriter │ │ │ │ ├── AggregateRewriteData.ts │ │ │ │ ├── ClassRewrite.ts │ │ │ │ ├── RewriteMapping.ts │ │ │ │ ├── StyleMapping.ts │ │ │ │ └── index.ts │ │ │ ├── configuration │ │ │ │ ├── OutputMode.ts │ │ │ │ ├── index.ts │ │ │ │ ├── resolver.ts │ │ │ │ └── types.ts │ │ │ ├── errors.ts │ │ │ ├── importing │ │ │ │ ├── BaseImporter.ts │ │ │ │ ├── Importer.ts │ │ │ │ ├── NodeJsImporter.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── query.ts │ │ │ └── util │ │ │ │ ├── PromiseQueue.ts │ │ │ │ ├── allDone.ts │ │ │ │ ├── index.ts │ │ │ │ ├── propertyParser.ts │ │ │ │ └── unionInto.ts │ │ ├── test │ │ │ ├── Block │ │ │ │ ├── block-test.ts │ │ │ │ ├── inheritable-test.ts │ │ │ │ ├── lookup-test.ts │ │ │ │ ├── ruleset-container-test.ts │ │ │ │ └── style-alias-test.ts │ │ │ ├── BlockFactoryCompiledCssFiles │ │ │ │ └── basic-test.ts │ │ │ ├── BlockParser │ │ │ │ ├── block-attribute-test.ts │ │ │ │ ├── block-composition-test.ts │ │ │ │ ├── block-construction-test.ts │ │ │ │ ├── block-name-test.ts │ │ │ │ ├── definition-file-processing-test.ts │ │ │ │ ├── import-export-test.ts │ │ │ │ ├── native-at-rules-test.ts │ │ │ │ ├── native-pseudos-test.ts │ │ │ │ └── selector-validation-test.ts │ │ │ ├── BlockSyntax │ │ │ │ └── block-path-test.ts │ │ │ ├── PrecompiledDefinitions │ │ │ │ └── compiled-comments-test.ts │ │ │ ├── acceptance │ │ │ │ └── DfnFilesFullWorkflow.ts │ │ │ ├── attribute-container-test.ts │ │ │ ├── block-definition-test.ts │ │ │ ├── block-factory-sync-test.ts │ │ │ ├── block-factory-test.ts │ │ │ ├── block-inheritance-test.ts │ │ │ ├── block-interface-test.ts │ │ │ ├── fixtures │ │ │ │ ├── BlockFactoryCompiledCssFiles │ │ │ │ │ └── basic │ │ │ │ │ │ ├── expectedProperties.json │ │ │ │ │ │ ├── nav.blockdef.css │ │ │ │ │ │ ├── nav.css │ │ │ │ │ │ ├── other.blockdef.css │ │ │ │ │ │ └── other.css │ │ │ │ ├── compiledFileImporting │ │ │ │ │ ├── embedded │ │ │ │ │ │ └── nav.css │ │ │ │ │ ├── expectedResults │ │ │ │ │ │ ├── expectedCssContents.txt │ │ │ │ │ │ └── expectedDfnContents.txt │ │ │ │ │ └── externaldef │ │ │ │ │ │ ├── nav.block.css │ │ │ │ │ │ └── nav.css │ │ │ │ ├── filesystemImporter │ │ │ │ │ ├── a.block.css │ │ │ │ │ ├── b.block.css │ │ │ │ │ ├── less.block.less │ │ │ │ │ ├── other.block.asdf │ │ │ │ │ ├── sass.block.sass │ │ │ │ │ ├── scss.block.scss │ │ │ │ │ └── stylus.block.styl │ │ │ │ ├── nodeModuleImporter │ │ │ │ │ ├── node_modules │ │ │ │ │ │ ├── @scoped │ │ │ │ │ │ │ ├── custom-main │ │ │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ │ │ ├── custom.block.css │ │ │ │ │ │ │ │ │ └── index.block.css │ │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ │ └── package │ │ │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ │ ├── index.block.css │ │ │ │ │ │ │ │ └── styles.block.css │ │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── package │ │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ ├── index.block.css │ │ │ │ │ │ │ └── styles.block.css │ │ │ │ │ │ │ └── package.json │ │ │ │ │ └── style.block.css │ │ │ │ └── pathAliasImporter │ │ │ │ │ ├── alias1.block.css │ │ │ │ │ └── alias_subdirectory │ │ │ │ │ └── sub.block.css │ │ │ ├── global-states-test.ts │ │ │ ├── importing-test.ts │ │ │ ├── importing │ │ │ │ └── base-importer-test.ts │ │ │ ├── local-scope-test.ts │ │ │ ├── mocha.opts │ │ │ ├── opticss-test.ts │ │ │ ├── output-mode-test.ts │ │ │ ├── plugin-api-test.ts │ │ │ ├── preprocessor-test.ts │ │ │ ├── query-test.ts │ │ │ ├── resolution-test.ts │ │ │ ├── template-analysis-test.ts │ │ │ ├── util │ │ │ │ ├── BEMProcessor.ts │ │ │ │ ├── MockImportRegistry.ts │ │ │ │ ├── TestAnalyzer.ts │ │ │ │ ├── assertError.ts │ │ │ │ ├── indented.ts │ │ │ │ ├── postcss-helper.ts │ │ │ │ └── setupImporting.ts │ │ │ └── validations │ │ │ │ ├── attribute-group-validator-test.ts │ │ │ │ ├── attribute-parent-validator-test.ts │ │ │ │ ├── class-pairs-validator-test.ts │ │ │ │ ├── property-conflict-validator-test.ts │ │ │ │ ├── root-class-validator-test.ts │ │ │ │ └── validator-test.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── ember-app │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── runtime │ │ │ ├── app │ │ │ │ └── services │ │ │ │ │ ├── AggregateRewriteData.ts │ │ │ │ │ ├── StyleEvaluator.ts │ │ │ │ │ ├── StyleResolver.ts │ │ │ │ │ ├── TestSupportData.ts │ │ │ │ │ ├── css-blocks-test-support.ts │ │ │ │ │ └── css-blocks.ts │ │ │ └── tsconfig.json │ │ ├── src │ │ │ ├── AggregateRewriteData.ts │ │ │ ├── RuntimeDataGenerator.ts │ │ │ ├── TestSupportData.ts │ │ │ ├── TestSupportDataGenerator.ts │ │ │ ├── broccoli-plugin.ts │ │ │ ├── index.ts │ │ │ └── utils │ │ │ │ ├── filepaths.ts │ │ │ │ └── interfaces.ts │ │ ├── test │ │ │ ├── mocha.opts │ │ │ └── runtime-data-generator-test.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── ember-cli │ │ ├── .editorconfig │ │ ├── .ember-cli │ │ ├── .eslintignore │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .watchmanconfig │ │ ├── CHANGELOG.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── addon │ │ │ └── helpers │ │ │ │ ├── -css-blocks-classnames.js │ │ │ │ └── -css-blocks-concat.js │ │ ├── app │ │ │ └── helpers │ │ │ │ ├── -css-blocks-classnames.js │ │ │ │ └── -css-blocks-concat.js │ │ ├── index.js │ │ └── package.json │ ├── ember-utils │ │ ├── CHANGELOG.md │ │ ├── package.json │ │ ├── src │ │ │ ├── BroccoliTreeImporter.ts │ │ │ ├── EmberAnalysis.ts │ │ │ ├── EmberAnalyzer.ts │ │ │ ├── HandlebarsTemplate.ts │ │ │ ├── index.ts │ │ │ └── options.ts │ │ ├── test │ │ │ └── mocha.opts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── ember │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── runtime │ │ │ ├── app │ │ │ │ └── helpers │ │ │ │ │ ├── -css-blocks-concat.ts │ │ │ │ │ └── -css-blocks.ts │ │ │ └── tsconfig.json │ │ ├── src │ │ │ ├── AnalyzingRewriteManager.ts │ │ │ ├── BroccoliFileLocator.ts │ │ │ ├── CSSBlocksTemplateCompilerPlugin.ts │ │ │ ├── ElementAnalyzer.ts │ │ │ ├── EmberBuiltins.ts │ │ │ ├── FileLocator.ts │ │ │ ├── TemplateAnalyzingRewriter.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── types │ │ │ │ ├── broccoli-debug │ │ │ │ │ └── index.d.ts │ │ │ │ ├── broccoli-funnel │ │ │ │ │ └── index.d.ts │ │ │ │ ├── ember-cli-preprocess-registry │ │ │ │ │ └── index.d.ts │ │ │ │ └── ember-cli │ │ │ │ │ └── index.d.ts │ │ │ └── utils.ts │ │ ├── test │ │ │ ├── mocha.opts │ │ │ └── template-rewrite-test.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ ├── tslint.release.json │ │ └── types │ │ │ ├── async-disk-cache │ │ │ └── index.d.ts │ │ │ ├── async-promise-queue │ │ │ └── index.d.ts │ │ │ ├── ember-cli-htmlbars │ │ │ └── template-compiler-plugin.d.ts │ │ │ ├── hash-for-dep │ │ │ └── index.d.ts │ │ │ ├── heimdalljs-logger │ │ │ └── index.d.ts │ │ │ ├── heimdalljs │ │ │ └── index.d.ts │ │ │ ├── promise-map-series │ │ │ └── index.d.ts │ │ │ └── sync-disk-cache │ │ │ └── index.d.ts │ ├── eyeglass │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ └── index.ts │ │ ├── test │ │ │ ├── fixtures │ │ │ │ ├── package-1 │ │ │ │ │ └── one.block.scss │ │ │ │ └── package-2 │ │ │ │ │ └── two.block.scss │ │ │ ├── mocha.opts │ │ │ └── package-test.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── glimmer │ │ ├── .gitignore │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ ├── settings.json │ │ │ └── tasks.json │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── Analyzer.ts │ │ │ ├── ClassnamesHelperGenerator.ts │ │ │ ├── ElementAnalyzer.ts │ │ │ ├── EmberBuiltins.ts │ │ │ ├── Resolver.ts │ │ │ ├── Rewriter.ts │ │ │ ├── Template.ts │ │ │ ├── helpers │ │ │ │ ├── classnames.ts │ │ │ │ ├── concat.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── module-config.ts │ │ │ └── utils.ts │ │ ├── test │ │ │ ├── classnames-helper-test.ts │ │ │ ├── fixtures.ts │ │ │ ├── fixtures │ │ │ │ ├── basic-app │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ │ └── ui │ │ │ │ │ │ ├── components │ │ │ │ │ │ ├── ferret-launcher │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ ├── my-app │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── component.ts │ │ │ │ │ │ │ ├── page-banner │ │ │ │ │ │ │ │ ├── -utils │ │ │ │ │ │ │ │ │ └── ignore-me.ts │ │ │ │ │ │ │ │ ├── component.ts │ │ │ │ │ │ │ │ ├── ignore-me.d.ts │ │ │ │ │ │ │ │ ├── template.hbs │ │ │ │ │ │ │ │ ├── titleize.ts │ │ │ │ │ │ │ │ └── user-avatar │ │ │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ ├── text-editor │ │ │ │ │ │ │ ├── component.ts │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ └── with-component-helper │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ └── index.html │ │ │ │ ├── readme-app │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ │ └── ui │ │ │ │ │ │ ├── components │ │ │ │ │ │ └── page-layout │ │ │ │ │ │ │ ├── grid.css │ │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ └── index.html │ │ │ │ └── styled-app │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ └── ui │ │ │ │ │ ├── components │ │ │ │ │ ├── ferret-launcher │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── my-app │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── component.ts │ │ │ │ │ │ ├── page-banner │ │ │ │ │ │ │ ├── -utils │ │ │ │ │ │ │ │ └── ignore-me.ts │ │ │ │ │ │ │ ├── component.ts │ │ │ │ │ │ │ ├── ignore-me.d.ts │ │ │ │ │ │ │ ├── template.hbs │ │ │ │ │ │ │ ├── titleize.ts │ │ │ │ │ │ │ └── user-avatar │ │ │ │ │ │ │ │ └── template.hbs │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── style-of-unsupported │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── text-editor │ │ │ │ │ │ ├── component.ts │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── with-block-aliases │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── with-dynamic-classes │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ ├── template.hbs │ │ │ │ │ │ └── typography.css │ │ │ │ │ ├── with-dynamic-inherited-states │ │ │ │ │ │ ├── grandparent.css │ │ │ │ │ │ ├── parent.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── with-dynamic-states │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── with-link-to │ │ │ │ │ │ ├── external.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ ├── template.hbs │ │ │ │ │ │ └── util.css │ │ │ │ │ ├── with-multiple-blocks │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ ├── with-style-helper │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ ├── template.hbs │ │ │ │ │ │ ├── templateHash.hbs │ │ │ │ │ │ └── templateInvalid.hbs │ │ │ │ │ └── with-style-of-subexpression │ │ │ │ │ │ ├── header.css │ │ │ │ │ │ ├── stylesheet.css │ │ │ │ │ │ └── template.hbs │ │ │ │ │ └── index.html │ │ │ ├── mocha.opts │ │ │ ├── recursive-template-dependencies-test.ts │ │ │ ├── stylesheet-analysis-test.ts │ │ │ ├── template-dependencies-test.ts │ │ │ ├── template-rewrite-test.ts │ │ │ └── tsconfig.json │ │ ├── tsconfig.amd.json │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── jsx │ │ ├── .gitignore │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ ├── settings.json │ │ │ └── tasks.json │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── Analyzer │ │ │ │ ├── Template.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── visitors │ │ │ │ │ ├── element.ts │ │ │ │ │ ├── importer.ts │ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── options.ts │ │ │ ├── styleFunctions │ │ │ │ ├── common.ts │ │ │ │ ├── index.ts │ │ │ │ └── objstrFunction.ts │ │ │ ├── transformer │ │ │ │ ├── babel.ts │ │ │ │ ├── classNameGenerator.ts │ │ │ │ └── index.ts │ │ │ └── utils │ │ │ │ ├── Errors.ts │ │ │ │ ├── ExpressionReader.ts │ │ │ │ ├── isBlockFilename.ts │ │ │ │ └── isConsoleLogStatement.ts │ │ ├── test │ │ │ ├── analyzer │ │ │ │ ├── class-states-objstr-test.ts │ │ │ │ ├── dynamic-styles-test.ts │ │ │ │ ├── external-objstr-class-test.ts │ │ │ │ ├── external-objstr-root-styles-test.ts │ │ │ │ ├── inline-class-styles-test.ts │ │ │ │ ├── inline-objstr-styles-test.ts │ │ │ │ ├── inline-root-styles-test.ts │ │ │ │ ├── root-states-objstr-test.ts │ │ │ │ ├── states-attributes-test.ts │ │ │ │ └── typed-file-analysis.ts │ │ │ ├── blockImporter-test.ts │ │ │ ├── cssblocks.d.ts │ │ │ ├── fixtures │ │ │ │ ├── basic-multifile │ │ │ │ │ ├── blocks │ │ │ │ │ │ ├── bar.block.css │ │ │ │ │ │ └── foo.block.css │ │ │ │ │ ├── components │ │ │ │ │ │ └── awesome-component.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── conflicting-local-multifile │ │ │ │ │ ├── blocks │ │ │ │ │ │ ├── bar.block.css │ │ │ │ │ │ └── foo.block.css │ │ │ │ │ ├── components │ │ │ │ │ │ └── awesome-component.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── deep-multifile │ │ │ │ │ ├── blocks │ │ │ │ │ │ ├── bar.block.css │ │ │ │ │ │ ├── baz.block.css │ │ │ │ │ │ └── foo.block.css │ │ │ │ │ ├── components │ │ │ │ │ │ ├── awesome-component-two.tsx │ │ │ │ │ │ └── awesome-component.tsx │ │ │ │ │ └── index.tsx │ │ │ │ └── duplicate-blocks-multifile │ │ │ │ │ ├── blocks │ │ │ │ │ ├── bar.block.css │ │ │ │ │ └── foo.block.css │ │ │ │ │ ├── components │ │ │ │ │ └── awesome-component.tsx │ │ │ │ │ └── index.tsx │ │ │ ├── mocha.opts │ │ │ ├── multi-file-discover │ │ │ │ └── multi-file-test.ts │ │ │ ├── parser-test.ts │ │ │ ├── transformer │ │ │ │ └── transformer-test.ts │ │ │ └── util.ts │ │ ├── tsconfig-runtime.json │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── language-server │ │ ├── .gitignore │ │ ├── .vscodeignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── Importer.ts │ │ │ ├── Server.ts │ │ │ ├── completionProviders │ │ │ │ └── emberCompletionProvider.ts │ │ │ ├── createBlockFactory.ts │ │ │ ├── definitionProviders │ │ │ │ └── emberDefinitionProvider.ts │ │ │ ├── documentLinksProviders │ │ │ │ └── blockLinkProvider.ts │ │ │ ├── eventHandlers │ │ │ │ └── documentContentChange.ts │ │ │ ├── pathTransformers │ │ │ │ ├── EmberClassicTransformer.ts │ │ │ │ └── PathTransformer.ts │ │ │ ├── run.ts │ │ │ ├── serverCapabilities.ts │ │ │ ├── test │ │ │ │ ├── fixtures │ │ │ │ │ ├── ember-classic-scss │ │ │ │ │ │ ├── css-blocks.config.js │ │ │ │ │ │ ├── styles │ │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ │ ├── block-with-errors.block.scss │ │ │ │ │ │ │ │ └── utils.block.scss │ │ │ │ │ │ │ └── components │ │ │ │ │ │ │ │ ├── a.block.scss │ │ │ │ │ │ │ │ └── import-completions.block.scss │ │ │ │ │ │ └── templates │ │ │ │ │ │ │ └── components │ │ │ │ │ │ │ └── a.hbs │ │ │ │ │ └── ember-classic │ │ │ │ │ │ ├── styles │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ ├── block-with-errors.block.css │ │ │ │ │ │ │ └── utils.block.css │ │ │ │ │ │ └── components │ │ │ │ │ │ │ ├── a.block.css │ │ │ │ │ │ │ └── import-completions.block.css │ │ │ │ │ │ └── templates │ │ │ │ │ │ └── components │ │ │ │ │ │ └── a.hbs │ │ │ │ ├── mocha.opts │ │ │ │ ├── server-test-scss.ts │ │ │ │ ├── server-test.ts │ │ │ │ └── util │ │ │ │ │ ├── TestStream.ts │ │ │ │ │ ├── createTextDocumentMock.ts │ │ │ │ │ └── createTextDocumentsMock.ts │ │ │ ├── types │ │ │ │ └── glob-escape.d.ts │ │ │ └── util │ │ │ │ ├── blockUtils.ts │ │ │ │ ├── createFocusPath.ts │ │ │ │ ├── diagnosticsUtils.ts │ │ │ │ ├── estTreeUtils.ts │ │ │ │ ├── hbsCompletionProvider.ts │ │ │ │ ├── hbsDefinitionProvider.ts │ │ │ │ ├── hbsUtils.ts │ │ │ │ └── pathTransformer.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ └── tslint.json │ ├── runtime │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── ExpressionContainer.ts │ │ │ ├── index.ts │ │ │ └── runtime.ts │ │ ├── test │ │ │ ├── expression-test.ts │ │ │ └── mocha.opts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── test-utils │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── index.ts │ │ │ └── mock-fs │ │ │ │ └── index.ts │ │ ├── test │ │ │ ├── mocha.opts │ │ │ └── mock-fs-test.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ ├── vscode │ │ ├── .gitignore │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── .vscodeignore │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── css-blocks.css-data.json │ │ ├── fixtures │ │ │ └── app │ │ │ │ ├── css-blocks.config.js │ │ │ │ ├── styles │ │ │ │ ├── nav.block.css │ │ │ │ ├── not-css-block.css │ │ │ │ └── subnav.block.css │ │ │ │ └── templates │ │ │ │ └── nav.hbs │ │ ├── package.json │ │ ├── scripts │ │ │ └── e2e.sh │ │ ├── src │ │ │ ├── extension.ts │ │ │ └── test │ │ │ │ ├── completion.test.ts │ │ │ │ ├── diagnostics.test.ts │ │ │ │ ├── helper.ts │ │ │ │ └── index.ts │ │ ├── testFixture │ │ │ ├── completion.txt │ │ │ └── diagnostics.txt │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ └── tslint.json │ ├── webpack │ │ ├── .gitignore │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ ├── settings.json │ │ │ └── tasks.json │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.md │ │ ├── NOTICE.md │ │ ├── README.md │ │ ├── examples │ │ │ ├── build.sh │ │ │ └── jsx │ │ │ │ ├── .gitignore │ │ │ │ ├── package.json │ │ │ │ ├── readme.md │ │ │ │ ├── src │ │ │ │ ├── Button.block.css │ │ │ │ ├── Button.jsx │ │ │ │ ├── index.block.css │ │ │ │ └── index.jsx │ │ │ │ ├── webpack.config.js │ │ │ │ └── yarn.lock │ │ ├── package.json │ │ ├── src │ │ │ ├── CssAssets.ts │ │ │ ├── LoaderOptions.ts │ │ │ ├── Plugin.ts │ │ │ ├── context.ts │ │ │ ├── index.ts │ │ │ └── loader.ts │ │ ├── test │ │ │ ├── configs │ │ │ │ ├── basicConfig.ts │ │ │ │ ├── defaultOutputConfig.ts │ │ │ │ ├── extractTextConfig.ts │ │ │ │ └── templateConfig.ts │ │ │ ├── fixtures │ │ │ │ ├── blocks │ │ │ │ │ ├── concat-1.block.css │ │ │ │ │ ├── concat-2.block.css │ │ │ │ │ ├── concat.template.css │ │ │ │ │ ├── concat.template.css.map │ │ │ │ │ ├── has-reference.block.css │ │ │ │ │ ├── has-reference.css │ │ │ │ │ ├── hello.block.css │ │ │ │ │ ├── hello.css │ │ │ │ │ └── is-referenced.block.css │ │ │ │ └── javascripts │ │ │ │ │ └── foo.js │ │ │ ├── mocha.opts │ │ │ ├── plugin-test.ts │ │ │ └── util │ │ │ │ ├── MockImportRegistry.ts │ │ │ │ ├── TestAnalyzer.ts │ │ │ │ ├── assertError.ts │ │ │ │ ├── execTest.ts │ │ │ │ └── testPaths.ts │ │ ├── tsconfig.json │ │ ├── tslint.cli.json │ │ ├── tslint.json │ │ └── tslint.release.json │ └── website │ │ ├── .gitignore │ │ ├── .snyk │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── config │ │ ├── css.js │ │ ├── env.js │ │ ├── example.config.js │ │ ├── jest │ │ │ ├── cssTransform.js │ │ │ └── fileTransform.js │ │ ├── paths.js │ │ ├── polyfills.js │ │ ├── webpack.config.dev.js │ │ ├── webpack.config.prod.js │ │ └── webpackDevServer.config.js │ │ ├── create-react-app.md │ │ ├── local-types │ │ ├── import-css.d.ts │ │ ├── import-img.d.ts │ │ └── obj-str.d.ts │ │ ├── package.json │ │ ├── public │ │ ├── .htaccess │ │ ├── favicon.ico │ │ ├── google025ea9ca935dea1b.html │ │ ├── images │ │ │ ├── background.svg │ │ │ ├── bug.png │ │ │ └── texture.svg │ │ ├── index.html │ │ ├── lib │ │ │ ├── baseline.css │ │ │ └── prismjs │ │ │ │ ├── LICENSE │ │ │ │ ├── prism.css │ │ │ │ └── prism.js │ │ └── manifest.json │ │ ├── scripts │ │ ├── build.js │ │ ├── deploy.sh │ │ ├── start.js │ │ └── test.js │ │ ├── server.js │ │ ├── src │ │ ├── App.block.css │ │ ├── App.test.tsx │ │ ├── App.tsx │ │ ├── images │ │ │ ├── bug.svg │ │ │ ├── linkedin-logo.svg │ │ │ ├── wordmark-animated.svg │ │ │ └── wordmark.svg │ │ ├── index.tsx │ │ ├── pages │ │ │ ├── Demo.tsx │ │ │ └── Home │ │ │ │ ├── Home.block.css │ │ │ │ ├── components │ │ │ │ └── CodeDemo │ │ │ │ │ ├── CodeDemo.block.css │ │ │ │ │ ├── demos │ │ │ │ │ ├── code.tsx │ │ │ │ │ ├── compile.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── optimize.ts │ │ │ │ │ └── index.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── test.block.css │ │ ├── registerServiceWorker.js │ │ ├── shared │ │ │ ├── Prism │ │ │ │ ├── Prism.block.css │ │ │ │ └── index.tsx │ │ │ ├── SplitButton │ │ │ │ ├── SplitButton.block.css │ │ │ │ └── index.tsx │ │ │ └── Tooltip │ │ │ │ ├── Tooltip.block.css │ │ │ │ └── index.tsx │ │ └── styles │ │ │ ├── button.block.css │ │ │ ├── grid.block.css │ │ │ └── typography.block.css │ │ ├── tsconfig.json │ │ ├── typedoc-theme │ │ ├── LICENSE │ │ ├── assets │ │ │ └── css │ │ │ │ ├── highlight-js.css │ │ │ │ └── main.css │ │ ├── layouts │ │ │ └── default.hbs │ │ ├── partials │ │ │ ├── breadcrumb.hbs │ │ │ ├── comment.hbs │ │ │ └── navigation.hbs │ │ └── templates │ │ │ └── index.hbs │ │ └── yarn.lock └── tsconfig.json ├── private-packages ├── fixtures-ember-v2 │ ├── ember-addon │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── addon │ │ │ ├── .gitkeep │ │ │ ├── components │ │ │ │ └── addon-component.js │ │ │ ├── styles │ │ │ │ └── components │ │ │ │ │ └── addon-component.block.css │ │ │ └── templates │ │ │ │ └── components │ │ │ │ └── addon-component.hbs │ │ ├── app │ │ │ ├── .gitkeep │ │ │ └── components │ │ │ │ └── addon-component.js │ │ ├── index.js │ │ └── package.json │ ├── ember-app.code-workspace │ ├── ember-app │ │ ├── .editorconfig │ │ ├── .ember-cli │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── .watchmanconfig │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── app │ │ │ ├── app.js │ │ │ ├── components │ │ │ │ ├── .gitkeep │ │ │ │ └── app-component.js │ │ │ ├── controllers │ │ │ │ ├── .gitkeep │ │ │ │ ├── compositions.js │ │ │ │ ├── node-modules-resolution.js │ │ │ │ └── route-block.js │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── index.html │ │ │ ├── initializers │ │ │ │ └── main.js │ │ │ ├── models │ │ │ │ └── .gitkeep │ │ │ ├── resolver.js │ │ │ ├── router.js │ │ │ ├── routes │ │ │ │ ├── .gitkeep │ │ │ │ ├── addon-component.js │ │ │ │ ├── app-component.js │ │ │ │ ├── compositions.js │ │ │ │ ├── ember-builtins.js │ │ │ │ ├── global-styles.js │ │ │ │ ├── node-modules-resolution.js │ │ │ │ └── route-block.js │ │ │ ├── styles │ │ │ │ ├── app.css │ │ │ │ ├── application.block.css │ │ │ │ ├── components │ │ │ │ │ └── app-component.block.css │ │ │ │ ├── compositions.block.css │ │ │ │ ├── ember-builtins.block.css │ │ │ │ ├── inherited-compositions.block.css │ │ │ │ ├── node-modules-resolution.block.css │ │ │ │ ├── route-block.block.css │ │ │ │ └── utility.block.css │ │ │ └── templates │ │ │ │ ├── addon-component.hbs │ │ │ │ ├── app-component.hbs │ │ │ │ ├── application.hbs │ │ │ │ ├── components │ │ │ │ └── app-component.hbs │ │ │ │ ├── compositions.hbs │ │ │ │ ├── ember-builtins.hbs │ │ │ │ ├── global-styles.hbs │ │ │ │ ├── node-modules-resolution.hbs │ │ │ │ └── route-block.hbs │ │ ├── config │ │ │ ├── environment.js │ │ │ ├── optional-features.json │ │ │ └── targets.js │ │ ├── ember-cli-build.js │ │ ├── package.json │ │ ├── public │ │ │ └── robots.txt │ │ ├── testem.js │ │ ├── tests │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── index.html │ │ │ ├── integration │ │ │ │ ├── .gitkeep │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ └── template-discovery-test.js │ │ │ ├── test-helper.js │ │ │ └── unit │ │ │ │ └── .gitkeep │ │ └── vendor │ │ │ └── .gitkeep │ ├── ember-engine │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── addon │ │ │ ├── engine.js │ │ │ ├── resolver.js │ │ │ ├── routes.js │ │ │ ├── styles │ │ │ │ └── application.block.css │ │ │ └── templates │ │ │ │ └── application.hbs │ │ ├── config │ │ │ └── environment.js │ │ ├── index.js │ │ └── package.json │ ├── ember-lazy-engine │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── addon │ │ │ ├── engine.js │ │ │ ├── resolver.js │ │ │ ├── routes.js │ │ │ ├── styles │ │ │ │ └── application.block.css │ │ │ └── templates │ │ │ │ └── application.hbs │ │ ├── config │ │ │ └── environment.js │ │ ├── index.js │ │ └── package.json │ └── npm-based-blocks │ │ ├── CHANGELOG.md │ │ ├── blocks │ │ ├── bold.block.css │ │ ├── enableable-component.block.css │ │ └── index.block.css │ │ └── package.json └── fixtures │ ├── ember-addon │ ├── CHANGELOG.md │ ├── README.md │ ├── addon │ │ ├── .gitkeep │ │ ├── components │ │ │ └── addon-component.js │ │ ├── styles │ │ │ └── components │ │ │ │ └── addon-component.block.css │ │ └── templates │ │ │ └── components │ │ │ └── addon-component.hbs │ ├── app │ │ ├── .gitkeep │ │ └── components │ │ │ └── addon-component.js │ ├── index.js │ └── package.json │ ├── ember-app.code-workspace │ ├── ember-app │ ├── .editorconfig │ ├── .ember-cli │ ├── .eslintignore │ ├── .gitignore │ ├── .watchmanconfig │ ├── CHANGELOG.md │ ├── README.md │ ├── app │ │ ├── app.js │ │ ├── components │ │ │ ├── .gitkeep │ │ │ └── app-component.js │ │ ├── controllers │ │ │ ├── .gitkeep │ │ │ ├── compositions.js │ │ │ ├── node-modules-resolution.js │ │ │ └── route-block.js │ │ ├── helpers │ │ │ └── .gitkeep │ │ ├── index.html │ │ ├── initializers │ │ │ └── main.js │ │ ├── models │ │ │ └── .gitkeep │ │ ├── resolver.js │ │ ├── router.js │ │ ├── routes │ │ │ ├── .gitkeep │ │ │ ├── addon-component.js │ │ │ ├── app-component.js │ │ │ ├── compositions.js │ │ │ ├── ember-builtins.js │ │ │ ├── global-styles.js │ │ │ ├── node-modules-resolution.js │ │ │ └── route-block.js │ │ ├── styles │ │ │ ├── app.css │ │ │ ├── application.block.css │ │ │ ├── components │ │ │ │ └── app-component.block.css │ │ │ ├── compositions.block.css │ │ │ ├── ember-builtins.block.css │ │ │ ├── inherited-compositions.block.css │ │ │ ├── node-modules-resolution.block.css │ │ │ ├── route-block.block.css │ │ │ └── utility.block.css │ │ └── templates │ │ │ ├── addon-component.hbs │ │ │ ├── app-component.hbs │ │ │ ├── application.hbs │ │ │ ├── components │ │ │ ├── .gitkeep │ │ │ └── app-component.hbs │ │ │ ├── compositions.hbs │ │ │ ├── ember-builtins.hbs │ │ │ ├── global-styles.hbs │ │ │ ├── node-modules-resolution.hbs │ │ │ └── route-block.hbs │ ├── config │ │ ├── environment.js │ │ ├── optional-features.json │ │ └── targets.js │ ├── ember-cli-build.js │ ├── package.json │ ├── public │ │ └── robots.txt │ ├── testem.js │ ├── tests │ │ ├── helpers │ │ │ └── .gitkeep │ │ ├── index.html │ │ ├── integration │ │ │ ├── .gitkeep │ │ │ ├── helpers │ │ │ │ ├── -css-blocks-classnames-test.js │ │ │ │ └── -css-blocks-concat-test.js │ │ │ └── template-discovery-test.js │ │ ├── test-helper.js │ │ └── unit │ │ │ └── .gitkeep │ └── vendor │ │ └── .gitkeep │ ├── ember-engine │ ├── CHANGELOG.md │ ├── README.md │ ├── addon │ │ ├── engine.js │ │ ├── resolver.js │ │ ├── routes.js │ │ ├── styles │ │ │ └── application.block.css │ │ └── templates │ │ │ └── application.hbs │ ├── config │ │ └── environment.js │ ├── index.js │ └── package.json │ └── ember-lazy-engine │ ├── CHANGELOG.md │ ├── README.md │ ├── addon │ ├── engine.js │ ├── resolver.js │ ├── routes.js │ ├── styles │ │ └── application.block.css │ └── templates │ │ └── application.hbs │ ├── config │ └── environment.js │ ├── index.js │ └── package.json ├── rfcs ├── ember-cli-blocks-v2.png └── rfc-ember-integration-v2.md ├── scripts ├── checkout-opticss-and-link.sh ├── checkout-opticss.sh ├── config.json ├── if-opticss-dev.sh └── link-to-opticss.js ├── tsconfig.json ├── typedoc.js ├── types-local ├── inline-source-map-comment │ ├── index.d.ts │ └── package.json ├── loader-utils │ ├── index.d.ts │ └── package.json ├── perfectionist │ ├── index.d.ts │ └── package.json ├── regexpu-core │ ├── index.d.ts │ └── package.json └── test-console │ ├── index.d.ts │ └── package.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | !packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules 3 | dist/ 4 | docs/ 5 | coverage/ 6 | build/ 7 | .DS_Store 8 | lerna-debug.log 9 | yarn-error.log 10 | package-lock.json 11 | .vscode 12 | jsconfig.json 13 | *.tsbuildinfo 14 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | if: tag IS blank 2 | git: 3 | depth: 1 4 | sudo: required 5 | language: node_js 6 | 7 | node_js: 8 | - "10" 9 | - "12" 10 | 11 | env: 12 | - CXX=g++-4.8 13 | 14 | addons: 15 | chrome: stable 16 | 17 | before_install: 18 | - npm install -g lerna yarn@1.17.3 19 | - ./scripts/if-opticss-dev.sh ./scripts/checkout-opticss.sh ../opticss 20 | - ./scripts/if-opticss-dev.sh ./scripts/link-to-opticss.js --file ../opticss 21 | 22 | install: 23 | - lerna bootstrap --registry=https://registry.npmjs.org/ 24 | 25 | script: lerna run --concurrency 1 test 26 | 27 | cache: 28 | yarn: true 29 | directories: 30 | - ~/.npm 31 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | registry "https://registry.npmjs.org/" 2 | --install.check-files true 3 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | Copyright 2018 LinkedIn Corporation and Contributors. 2 | All Rights Reserved. 3 | 4 | Licensed under the BSD 2-Clause License (the "License"). 5 | See [LICENSE](./LICENSE.md) in the project root for license information. 6 | 7 | With the exception any directories containing their own `LICENSE` file are redistributions 8 | and covered under the existing license terms. Of note: 9 | 10 | * `packages/@css-blocks/website/docs-theme`: Contains software licensed according to [Apache License 2.0](./packages/@css-blocks/website/docs-theme/LICENSE). 11 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'subject-full-stop': [2, 'always', '.'], 5 | 'subject-case': [ 6 | 2, 'always', 7 | ['sentence-case'] 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.5.0", 3 | "packages": [ 4 | "packages/@css-blocks/*" 5 | ], 6 | "command": { 7 | "publish": { 8 | "allowBranch": "master", 9 | "conventionalCommits": true, 10 | "message": "chore(release): Publish %s." 11 | } 12 | }, 13 | "ignoreChanges": [ 14 | "**/test/**", 15 | "**/*.md", 16 | "**/ts*.json", 17 | "**/*config*.json" 18 | ], 19 | "npmClient": "yarn", 20 | "useWorkspaces": true 21 | } 22 | -------------------------------------------------------------------------------- /packages/@css-blocks/.gitignore: -------------------------------------------------------------------------------- 1 | !build 2 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/README.md: -------------------------------------------------------------------------------- 1 | # BEM to CSS Blocks 2 | 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/configs/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@opticss/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/configs/tslint.interactive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@opticss/code-style/configs/tslint.interactive.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/configs/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@opticss/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist", 7 | "paths": { 8 | "sass": ["../../../node_modules/@types/node-sass"] 9 | } 10 | }, 11 | "references": [ 12 | {"path": "../core"} 13 | ], 14 | "include": [ 15 | "src", 16 | "test" 17 | ], 18 | "exclude": [ 19 | "dist", 20 | "node_modules" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/bem-to-blocks/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/README.md: -------------------------------------------------------------------------------- 1 | Broccoli Plugin for CSS Blocks 2 | ============================= 3 | 4 | TBD 5 | 6 | Getting Started 7 | --------------- 8 | 9 | ``` 10 | $ npm install --save-dev @css-blocks/broccoli 11 | ``` 12 | 13 | Add to configuration: 14 | 15 | TBD -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/src/index.ts: -------------------------------------------------------------------------------- 1 | export { CSSBlocksAnalyze } from "./Analyze"; 2 | export { CSSBlocksAggregate } from "./Aggregate"; 3 | export { Transport } from "./Transport"; 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist" 7 | }, 8 | "references": [ 9 | {"path": "../glimmer"}, 10 | {"path": "../core"} 11 | ], 12 | "include": [ 13 | "src", 14 | "test" 15 | ], 16 | "exclude": [ 17 | "sanity", 18 | "dist", 19 | "node_modules" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/broccoli/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/bin/css-blocks: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const { CLI } = require("../dist/src/index"); 3 | let cli = new CLI(); 4 | cli.run(process.argv.slice(2)); -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/TestCLI.ts: -------------------------------------------------------------------------------- 1 | import { CLI } from "../src/index"; 2 | 3 | export class TestCLI extends CLI { 4 | output: string; 5 | exitCode: number | undefined; 6 | constructor() { 7 | super(); 8 | this.output = ""; 9 | this.chalk.enabled = false; 10 | } 11 | println(...texts: string[]) { 12 | this.output += texts.join(" ") + "\n"; 13 | } 14 | argumentParser() { 15 | let parser = super.argumentParser(); 16 | parser.exitProcess(false); 17 | return parser; 18 | } 19 | exit(code: number) { 20 | this.exitCode = code; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/.gitignore: -------------------------------------------------------------------------------- 1 | !node_modules 2 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/basic/attribute-error.block.css: -------------------------------------------------------------------------------- 1 | .foo[disabled=disabled] { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/basic/deep-transitive-error.block.css: -------------------------------------------------------------------------------- 1 | @block error from "./transitive-error.block.css"; 2 | 3 | :scope { 4 | extends: error; 5 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/basic/error.block.css: -------------------------------------------------------------------------------- 1 | .foo.bar { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/basic/simple.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/basic/transitive-error.block.css: -------------------------------------------------------------------------------- 1 | @block error from "./error.block.css"; 2 | 3 | :scope { 4 | extends: error; 5 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/config-file/css-blocks.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "preprocessors": "../../../dist/test/preprocessors.js" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/config-file/simple.block.scss: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | background-color: white; 4 | 5 | &[dark] { 6 | color: darkred; 7 | background-color: gray; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/importing/alias.block.css: -------------------------------------------------------------------------------- 1 | @block red from "basic/simple.block.css"; 2 | 3 | :scope { 4 | font-family: resolve("red"); 5 | color: blue; 6 | } 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/importing/node_modules/block-module/blocks/font.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-family: sans-serif; 3 | } 4 | 5 | :scope[weight=bold] { 6 | font-weight: bold; 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/importing/node_modules/block-module/index.block.css: -------------------------------------------------------------------------------- 1 | @block font from "blocks/font.block.css"; 2 | 3 | @export font; -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/importing/node_modules/block-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "block-module", 4 | "css-blocks": { 5 | "main": "index.block.css" 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/importing/npm.block.css: -------------------------------------------------------------------------------- 1 | @block font from "block-module"; 2 | 3 | :scope { 4 | font-family: resolve("font"); 5 | font-family: serif; 6 | } 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/scss/another-error.block.scss: -------------------------------------------------------------------------------- 1 | @import "mixins"; 2 | 3 | .a { 4 | @include plus-b() { 5 | color: purple; 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/scss/error.block.scss: -------------------------------------------------------------------------------- 1 | @import "mixins"; 2 | 3 | .foo { 4 | color: red; 5 | @include add-bar() { 6 | color: blue; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/scss/missing-style.block.scss: -------------------------------------------------------------------------------- 1 | @block simple from "./simple.block.scss"; 2 | 3 | .composer { 4 | composes: "simple[light]"; 5 | color: blue; 6 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/scss/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin add-bar() { 2 | &.bar { 3 | @content; 4 | } 5 | } 6 | 7 | @mixin plus-b() { 8 | & + .bbb { 9 | @content; 10 | } 11 | } 12 | 13 | @mixin in-state($state-name, $state-value: null) { 14 | @if $state-value { 15 | &[#{$state-name}=#{$state-value}] { 16 | @content; 17 | } 18 | } 19 | @else { 20 | &[#{$state-name}] { 21 | @content; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/scss/simple.block.scss: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | background-color: white; 4 | 5 | &[dark] { 6 | color: darkred; 7 | background-color: gray; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/fixtures/scss/tagname-error.block.scss: -------------------------------------------------------------------------------- 1 | @import "mixins"; 2 | 3 | div { 4 | @include in-state(selected) { 5 | outline: 1px dotted black; 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/cli/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist", 7 | "paths": { 8 | "sass": ["../../../node_modules/@types/node-sass"] 9 | } 10 | }, 11 | "references": [ 12 | {"path": "../bem-to-blocks"}, 13 | {"path": "../core"}, 14 | {"path": "../config"} 15 | ], 16 | "include": [ 17 | "src", 18 | "test" 19 | ], 20 | "exclude": [ 21 | "dist", 22 | "node_modules" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/cli/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "transpiled" 4 | ] 5 | } -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/configs/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@opticss/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/configs/tslint.interactive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@opticss/code-style/configs/tslint.interactive.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/configs/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@opticss/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "include": [ 4 | "src" 5 | ], 6 | "compilerOptions": { 7 | "outDir": "dist", 8 | "baseUrl": "dist" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "./configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./configs/tslint-interactive.json" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/code-style/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "./configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/another-js-file/css-blocks.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "../from-js-file/css-blocks.config.js" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-js-file/blocks/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/config/test/fixtures/from-js-file/blocks/.gitkeep -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-js-file/css-blocks.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "../from-pkg-json/package.json", 3 | maxConcurrentCompiles: 8, 4 | rootDir: "blocks", 5 | preprocessors: { 6 | styl: (_fullPath, content, _configuration, _sourceMap) => {return {content}; }, 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-json-file/config/importer.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | importer: { 3 | isImporter() { 4 | return true; 5 | } 6 | }, 7 | data: ['a', 'b', 'c'], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-json-file/config/preprocessors.js: -------------------------------------------------------------------------------- 1 | function less(_fullPath, content, _configuration, _sourceMap) { 2 | return Promise.resolve({ content }); 3 | } 4 | module.exports = { 5 | less 6 | }; -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-json-file/css-blocks.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../from-pkg-json/package.json", 3 | "outputMode": "BEM_UNIQUE", 4 | "preprocessors": "config/preprocessors.js", 5 | "importer": "config/importer.js" 6 | } -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-json-file/subdir/another-subdir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/config/test/fixtures/from-json-file/subdir/another-subdir/.gitkeep -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-pkg-json/config/preprocessors.js: -------------------------------------------------------------------------------- 1 | function scss(_fullPath, content, _configuration, _sourceMap) { 2 | return Promise.resolve({ content }); 3 | } 4 | module.exports = { 5 | scss 6 | }; -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-pkg-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-from-package-json", 3 | "private": true, 4 | "css-blocks": { 5 | "outputMode": "BEM", 6 | "preprocessors": "config/preprocessors.js" 7 | } 8 | } -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/fixtures/from-pkg-json/subdir/another-subdir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/config/test/fixtures/from-pkg-json/subdir/another-subdir/.gitkeep -------------------------------------------------------------------------------- /packages/@css-blocks/config/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist", 7 | "paths": { 8 | "sass": ["../../../node_modules/@types/node-sass"] 9 | } 10 | }, 11 | "references": [ 12 | {"path": "../core"} 13 | ], 14 | "include": [ 15 | "src", 16 | "test" 17 | ], 18 | "exclude": [ 19 | "dist", 20 | "node_modules" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /packages/@css-blocks/config/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/config/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/config/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/dist/**/*": true, 5 | "**/*.lock": true 6 | }, 7 | "editor.tabSize": 2, 8 | "cSpell.words": [ 9 | "Opticss", 10 | "deserialize", 11 | "klass" 12 | ], 13 | "tslint.packageManager": "yarn", 14 | "npm.packageManager": "yarn" 15 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "compile", 8 | "type": "npm", 9 | "script": "compile", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | }, 14 | "problemMatcher": [ 15 | "$tsc", 16 | "$tslint5" 17 | ] 18 | }, 19 | { 20 | "type": "npm", 21 | "script": "test", 22 | "problemMatcher": [] 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/TEMPLATES.md: -------------------------------------------------------------------------------- 1 | # CSS Blocks Template Integrations 2 | 3 | TODO: Write template integration instructions. -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/Analyzer/README.md: -------------------------------------------------------------------------------- 1 | # Template Analysis 2 | ## TODO: Write Template Analysis Documentation -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/Analyzer/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | IAnalysis as Analysis, 3 | SerializedAnalysis, 4 | SerializedSourceAnalysis, 5 | Analysis as AnalysisImpl, 6 | } from "./Analysis"; 7 | export { Analyzer, AnalysisOptions, SerializedAnalyzer } from "./Analyzer"; 8 | export * from "./ElementAnalysis"; 9 | export { 10 | TemplateValidator, 11 | TemplateValidators, 12 | TemplateValidatorOptions, 13 | } from "./validations"; 14 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/Analyzer/validations/Validator.ts: -------------------------------------------------------------------------------- 1 | import { TemplateTypes } from "@opticss/template-api"; 2 | 3 | import { Analysis } from "../Analysis"; 4 | import { ElementAnalysis } from "../ElementAnalysis"; 5 | 6 | export type ErrorCallback = (str: string, loc?: null, details?: string) => void; 7 | export type Validator = (analysis: ElementAnalysis, templateAnalysis: Analysis, err: ErrorCallback) => void; 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/BlockParser/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { BlockNames, parseBlockNames, parseBlockNamesAST } from "./blockNamesParser"; 2 | export { stripQuotes } from "./stripQuotes"; 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/BlockParser/utils/stripQuotes.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Strip matching quotes from the beginning and end of a string 3 | * @param str String to strip quotes from 4 | * @return Result 5 | */ 6 | export function stripQuotes(str: string): string { 7 | return str.replace(/^(["']?)(.+)\1$/, "$2"); 8 | } 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/BlockSyntax/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./BlockSyntax"; 2 | export * from "./BlockPath"; 3 | export * from "./parseBlockDebug"; 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/BlockTree/Styles.ts: -------------------------------------------------------------------------------- 1 | import { isObject } from "@opticss/util"; 2 | 3 | import { AttrValue, isAttrValue } from "./AttrValue"; 4 | import { BlockClass, isBlockClass } from "./BlockClass"; 5 | 6 | export { BlockClass } from "./BlockClass"; 7 | export { AttrValue } from "./AttrValue"; 8 | export type Styles = AttrValue | BlockClass; 9 | 10 | export function isStyle(o: unknown): o is Styles { 11 | return isObject(o) && (isBlockClass(o) || isAttrValue(o)); 12 | } 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/BlockTree/index.ts: -------------------------------------------------------------------------------- 1 | export { Block, isBlock } from "./Block"; 2 | export { BlockClass, Composition, isBlockClass } from "./BlockClass"; 3 | export { Attribute, isAttribute } from "./Attribute"; 4 | export { AttrValue, isAttrValue } from "./AttrValue"; 5 | export { Ruleset, RulesetContainer } from "./RulesetContainer"; 6 | export { isStyle, Styles as Style } from "./Styles"; 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/PrecompiledDefinitions/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | REGEXP_COMMENT_HEADER, 3 | REGEXP_COMMENT_DEFINITION_REF, 4 | REGEXP_COMMENT_FOOTER, 5 | } from "./compiled-comments"; 6 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/TemplateRewriter/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./RewriteMapping"; 2 | export * from "./StyleMapping"; 3 | export * from "./ClassRewrite"; 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/configuration/OutputMode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Supported output mode types 3 | */ 4 | export enum OutputMode { 5 | BEM = "BEM", 6 | BEM_UNIQUE = "BEM_UNIQUE", 7 | } 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/configuration/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Configuration, 3 | Options, 4 | ResolvedConfiguration, 5 | } from "./types"; 6 | export { OutputMode } from "./OutputMode"; 7 | export { resolveConfiguration }from "./resolver"; 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/importing/index.ts: -------------------------------------------------------------------------------- 1 | import { NodeJsImporter } from "./NodeJsImporter"; 2 | 3 | export { BaseImporter } from "./BaseImporter"; 4 | export { 5 | ImporterData, 6 | FileIdentifier, 7 | ImportedFile, 8 | ImportedCompiledCssFile, 9 | ImportedCompiledCssFileContents, 10 | Importer, 11 | } from "./Importer"; 12 | export { NodeJsImporter } from "./NodeJsImporter"; 13 | 14 | /** 15 | * Default importer. Returns `ImportedFile` from disk 16 | */ 17 | export const defaultImporter = new NodeJsImporter(); 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module @css-blocks/core 3 | * 4 | * Core data models for CSS Blocks. 5 | */ 6 | export * from "./BlockTree"; 7 | export * from "./errors"; 8 | export * from "./SourceLocation"; 9 | export * from "./configuration"; 10 | export * from "./BlockCompiler"; 11 | export * from "./BlockSyntax"; 12 | export * from "./BlockParser"; 13 | export * from "./errors"; 14 | export * from "./importing"; 15 | export * from "./Analyzer"; 16 | export * from "./TemplateRewriter"; 17 | export * from "./configuration"; 18 | export * from "./util"; 19 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/util/index.ts: -------------------------------------------------------------------------------- 1 | export { allDone } from "./allDone"; 2 | export { unionInto } from "./unionInto"; 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/src/util/unionInto.ts: -------------------------------------------------------------------------------- 1 | export function unionInto(target: Set, ...sets: Iterable[]) { 2 | for (let set of sets) { 3 | for (let v of set) { 4 | target.add(v); 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/Block/block-test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/Block/block-test.ts -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/BlockFactoryCompiledCssFiles/basic/nav.blockdef.css: -------------------------------------------------------------------------------- 1 | @block-syntax-version 1; 2 | 3 | :scope { 4 | block-id: "7d97e"; 5 | block-name: nav; 6 | block-class: nav-7d97e; 7 | } 8 | 9 | :scope[mode="light"] { 10 | block-class: nav-7d97e--light; 11 | } 12 | 13 | :scope[mode="dark"] { 14 | block-class: nav-7d97e--dark; 15 | } 16 | 17 | .item { 18 | block-class: nav-7d97e__item; 19 | } 20 | 21 | .item[current] { 22 | block-class: nav-7d97e__item--current; 23 | } 24 | 25 | .item[promo] { 26 | block-class: nav-7d97e__item--promo; 27 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/BlockFactoryCompiledCssFiles/basic/other.blockdef.css: -------------------------------------------------------------------------------- 1 | @block-syntax-version 1; 2 | 3 | :scope { 4 | block-id: abc12; 5 | block-name: other; 6 | block-class: other-abc12; 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/BlockFactoryCompiledCssFiles/basic/other.css: -------------------------------------------------------------------------------- 1 | /*#css-blocks abc12*/ 2 | .other-abc12 { 3 | width: 300px; 4 | height: 50px; 5 | background-color: #99F; 6 | } 7 | /*#blockDefinitionURL=other.blockdef.css*/ 8 | /*#css-blocks end*/ -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/compiledFileImporting/expectedResults/expectedCssContents.txt: -------------------------------------------------------------------------------- 1 | .nav-7d97e { 2 | display: flex; 3 | } 4 | .nav-7d97e__entry { 5 | flex: 1; 6 | } 7 | .nav-7d97e__entry--active { 8 | font-weight: bold; 9 | } 10 | .nav-7d97e__entry--active.link-3c287 { 11 | font-weight: bold; 12 | } 13 | .nav-7d97e__entry:hover { 14 | text-shadow: 2px 2px 1px; 15 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/compiledFileImporting/externaldef/nav.css: -------------------------------------------------------------------------------- 1 | /* This is a test compiled css file. */ 2 | /*#css-blocks 7d97e*/ 3 | .nav-7d97e { 4 | display: flex; 5 | } 6 | .nav-7d97e__entry { 7 | flex: 1; 8 | } 9 | .nav-7d97e__entry--active { 10 | font-weight: bold; 11 | } 12 | .nav-7d97e__entry--active.link-3c287 { 13 | font-weight: bold; 14 | } 15 | .nav-7d97e__entry:hover { 16 | text-shadow: 2px 2px 1px; 17 | } 18 | /*#blockDefinitionURL=nav.block.css*/ 19 | /*#css-blocks end*/ -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/a.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/b.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/less.block.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/filesystemImporter/less.block.less -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/other.block.asdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/filesystemImporter/other.block.asdf -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/sass.block.sass: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/filesystemImporter/sass.block.sass -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/scss.block.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/filesystemImporter/scss.block.scss -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/filesystemImporter/stylus.block.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/filesystemImporter/stylus.block.styl -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/custom-main/blocks/custom.block.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/custom-main/blocks/custom.block.css -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/custom-main/blocks/index.block.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/custom-main/blocks/index.block.css -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/custom-main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scoped/custom-main", 3 | "css-blocks": { 4 | "main": "blocks/custom.block.css" 5 | } 6 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/package/blocks/index.block.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/package/blocks/index.block.css -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/package/blocks/styles.block.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/package/blocks/styles.block.css -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/@scoped/package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scoped/package" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/package/blocks/index.block.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/package/blocks/index.block.css -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/package/blocks/styles.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/node_modules/package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/nodeModuleImporter/style.block.css: -------------------------------------------------------------------------------- 1 | @block unscoped from "package"; 2 | @block scoped from "@scoped/package"; 3 | 4 | :scope { 5 | color: yellow; 6 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/pathAliasImporter/alias1.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: large; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/fixtures/pathAliasImporter/alias_subdirectory/sub.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: small; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | --recursive 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/test/util/TestAnalyzer.ts: -------------------------------------------------------------------------------- 1 | import { Analyzer } from "../../src/Analyzer"; 2 | 3 | export class TestAnalyzer extends Analyzer<"Opticss.Template"> { 4 | analyze() { return Promise.resolve(this); } 5 | get optimizationOptions() { 6 | return { 7 | rewriteIdents: { 8 | id: false, 9 | class: true, 10 | omitIdents: { 11 | id: [], 12 | class: [], 13 | }, 14 | }, 15 | analyzedAttributes: ["class"], 16 | analyzedTagnames: false, 17 | }; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/core/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/runtime/app/services/AggregateRewriteData.ts: -------------------------------------------------------------------------------- 1 | ../../../src/AggregateRewriteData.ts -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/runtime/app/services/TestSupportData.ts: -------------------------------------------------------------------------------- 1 | ../../../src/TestSupportData.ts -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/runtime/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "ESNext", 5 | "composite": true, 6 | "outDir": "../dist/runtime", 7 | "baseUrl": ".", 8 | "strict": true, 9 | "sourceMap": false, 10 | "declarationMap": false, 11 | "preserveConstEnums": false, 12 | "tsBuildInfoFile": "../runtime.tsbuildinfo", 13 | "paths": { 14 | "@css-blocks/ember/*": ["addon/*"] 15 | }, 16 | "traceResolution": false 17 | }, 18 | "include": [ 19 | "." 20 | ], 21 | "exclude": [ 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/src/TestSupportDataGenerator.ts: -------------------------------------------------------------------------------- 1 | import { BlockId, TestSupportData } from "./TestSupportData"; 2 | 3 | export class TestSupportDataGenerator { 4 | runtimeBlockMapping: TestSupportData; 5 | constructor() { 6 | this.runtimeBlockMapping = {}; 7 | } 8 | addExportedBlockGuid(filePath: string, exportedBlockName: string, guid: BlockId) { 9 | if (!this.runtimeBlockMapping[filePath]) { 10 | this.runtimeBlockMapping[filePath] = {}; 11 | } 12 | this.runtimeBlockMapping[filePath][exportedBlockName] = guid; 13 | } 14 | get data(): TestSupportData { 15 | return this.runtimeBlockMapping; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember-app/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/.eslintignore: -------------------------------------------------------------------------------- 1 | /blueprints/*/files/**/*.js 2 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # misc 12 | /.sass-cache 13 | /connect.lock 14 | /coverage/* 15 | /libpeerconnection.log 16 | npm-debug.log* 17 | yarn-error.log 18 | testem.log 19 | 20 | # ember-try 21 | .node_modules.ember-try/ 22 | bower.json.ember-try 23 | package.json.ember-try 24 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/.npmignore: -------------------------------------------------------------------------------- 1 | /bower_components 2 | /config/ember-try.js 3 | /dist 4 | /tests 5 | /tmp 6 | **/.gitkeep 7 | .bowerrc 8 | .editorconfig 9 | .ember-cli 10 | .eslintrc.js 11 | .gitignore 12 | .watchmanconfig 13 | .travis.yml 14 | bower.json 15 | ember-cli-build.js 16 | testem.js 17 | 18 | # ember-try 19 | .node_modules.ember-try/ 20 | bower.json.ember-try 21 | package.json.ember-try 22 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/addon/helpers/-css-blocks-classnames.js: -------------------------------------------------------------------------------- 1 | import { classnames } from "@css-blocks/helpers/classnames"; 2 | import { helper } from "@ember/component/helper"; 3 | 4 | export default helper(classnames); 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/addon/helpers/-css-blocks-concat.js: -------------------------------------------------------------------------------- 1 | import { concat } from "@css-blocks/helpers/concat"; 2 | import { helper } from "@ember/component/helper"; 3 | 4 | export default helper(concat); 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/app/helpers/-css-blocks-classnames.js: -------------------------------------------------------------------------------- 1 | export { default } from '@css-blocks/ember-cli/helpers/-css-blocks-classnames'; 2 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-cli/app/helpers/-css-blocks-concat.js: -------------------------------------------------------------------------------- 1 | export { default } from '@css-blocks/ember-cli/helpers/-css-blocks-concat'; 2 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-utils/src/EmberAnalysis.ts: -------------------------------------------------------------------------------- 1 | import { AnalysisImpl, Block, DEFAULT_EXPORT, TemplateValidatorOptions } from "@css-blocks/core"; 2 | 3 | import { HandlebarsTemplate, TEMPLATE_TYPE as HANDLEBARS_TEMPLATE } from "./HandlebarsTemplate"; 4 | 5 | export class EmberAnalysis extends AnalysisImpl { 6 | constructor(template: HandlebarsTemplate, block: Block | undefined | null, options: TemplateValidatorOptions) { 7 | super(template, options); 8 | if (block) { 9 | this.addBlock(DEFAULT_EXPORT, block); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./BroccoliTreeImporter"; 2 | export * from "./options"; 3 | export * from "./EmberAnalysis"; 4 | export * from "./HandlebarsTemplate"; 5 | export * from "./EmberAnalyzer"; 6 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-utils/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/ember-utils/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember-utils/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember-utils/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember/runtime/app/helpers/-css-blocks-concat.ts: -------------------------------------------------------------------------------- 1 | /// @ts-ignore 2 | import { helper } from "@ember/component/helper"; 3 | 4 | // tslint:disable-next-line:prefer-unknown-to-any 5 | function _concat(args: any[]) { 6 | return args.join(""); 7 | } 8 | 9 | const concat = helper(_concat); 10 | 11 | // tslint:disable-next-line:no-default-export 12 | export default concat; 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember/runtime/app/helpers/-css-blocks.ts: -------------------------------------------------------------------------------- 1 | /// @ts-ignore 2 | import Helper from "@ember/component/helper"; 3 | /// @ts-ignore 4 | import { inject as service } from "@ember/service"; 5 | 6 | interface CSSBlocksService { 7 | classNamesFor(args: Array): string; 8 | } 9 | 10 | // tslint:disable-next-line:no-default-export 11 | export default class CSSBlocksHelper extends Helper { 12 | @service("css-blocks") 13 | cssBlocks!: CSSBlocksService; 14 | 15 | compute(...args: [Array, object]) { 16 | return this.cssBlocks.classNamesFor(args[0]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember/runtime/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "ESNext", 5 | "composite": true, 6 | "outDir": "../dist/runtime", 7 | "baseUrl": ".", 8 | "strict": true, 9 | "sourceMap": false, 10 | "declarationMap": false, 11 | "tsBuildInfoFile": "../runtime.tsbuildinfo", 12 | "paths": { 13 | "@css-blocks/ember/*": ["addon/*"] 14 | }, 15 | "traceResolution": false 16 | }, 17 | "include": [ 18 | "." 19 | ], 20 | "exclude": [ 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember/src/helpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/ember/src/helpers.ts -------------------------------------------------------------------------------- /packages/@css-blocks/ember/src/types/broccoli-funnel/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "broccoli-funnel" { 2 | import { InputNode } from "broccoli-node-api"; 3 | namespace funnel { 4 | type FunnelOptions = Optional<{ 5 | annotation: string; 6 | srcDir: string; 7 | destDir: string; 8 | allowEmpty: boolean; 9 | include: Array boolean)>; 10 | exclude: Array boolean)>; 11 | files: Array; 12 | getDestinationPath(file: string): string; 13 | }>; 14 | } 15 | function funnel(inputNode: InputNode, options: funnel.FunnelOptions); 16 | export = funnel; 17 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/ember/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/async-disk-cache/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'async-disk-cache' { 2 | namespace AsyncDiskCache { 3 | export interface Options { 4 | location?: string | undefined; 5 | compression?: 'deflate'; 6 | } 7 | } 8 | 9 | interface CacheEntry { 10 | isCached: boolean; 11 | value: T; 12 | } 13 | 14 | class AsyncDiskCache { 15 | root: string; 16 | constructor(cacheKey: string, options: AsyncDiskCache.Options) 17 | get(key: string): Promise>; 18 | set(key: string, value: T): Promise; 19 | } 20 | export = AsyncDiskCache; 21 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/async-promise-queue/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'async-promise-queue' { 2 | import * as Async from 'async'; 3 | function queue(worker: Async.AsyncWorker, Work: Array, concurrency: number): Promise; 4 | namespace queue { 5 | export const async: typeof Async; 6 | } 7 | export = queue; 8 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/hash-for-dep/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'hash-for-dep' { 2 | function hashForDep(path: string): string; 3 | export = hashForDep; 4 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/heimdalljs-logger/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'heimdalljs-logger' { 2 | namespace loggerGenerator { 3 | interface Logger { 4 | info(...args: Array): void; 5 | debug(...args: Array): void; 6 | } 7 | } 8 | function loggerGenerator(name: string): loggerGenerator.Logger; 9 | export = loggerGenerator; 10 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/heimdalljs/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'heimdalljs' { 2 | interface Schema { 3 | new (): T; 4 | } 5 | interface Node { 6 | stats: T; 7 | stop(): void; 8 | } 9 | namespace heimdall { 10 | export function start(label: string, schema?: Schema): Node; 11 | export function node(label: string, schema: Schema, callback: (instrumentation: T) => R): R; 12 | } 13 | export = heimdall; 14 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/promise-map-series/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'promise-map-series' { 2 | function mapSeries(series: Array, mapper: (s: T) => R): Array; 3 | export = mapSeries; 4 | } -------------------------------------------------------------------------------- /packages/@css-blocks/ember/types/sync-disk-cache/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'sync-disk-cache' { 2 | namespace SyncDiskCache { 3 | export interface Options { 4 | location?: string | undefined; 5 | } 6 | } 7 | 8 | interface CacheEntry { 9 | isCached: boolean; 10 | value: T; 11 | } 12 | 13 | class SyncDiskCache { 14 | root: string; 15 | constructor(cacheKey: string, options: SyncDiskCache.Options) 16 | get(key: string): CacheEntry; 17 | set(key: string, value: T): void; 18 | } 19 | export = SyncDiskCache; 20 | } -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/test/fixtures/package-1/one.block.scss: -------------------------------------------------------------------------------- 1 | @mixin block($name) { 2 | :root { 3 | name: $name; 4 | } 5 | } 6 | 7 | @include block("uno"); 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/test/fixtures/package-2/two.block.scss: -------------------------------------------------------------------------------- 1 | @mixin block($name) { 2 | :root { 3 | name: $name; 4 | } 5 | } 6 | 7 | @include block("dos"); 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist", 7 | "paths": { 8 | "sass": ["../../../node_modules/@types/node-sass"] 9 | } 10 | }, 11 | "references": [ 12 | {"path": "../core"} 13 | ], 14 | "include": [ 15 | "src", 16 | "test" 17 | ], 18 | "exclude": [ 19 | "dist", 20 | "node_modules" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/eyeglass/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/dist/**/*": true, 5 | "**/*.lock": true 6 | }, 7 | "editor.tabSize": 2, 8 | "tslint.packageManager": "yarn", 9 | "npm.packageManager": "yarn" 10 | } -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "compile", 8 | "type": "npm", 9 | "script": "compile", 10 | "problemMatcher": [] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/src/helpers/concat.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable-next-line:prefer-unknown-to-any 2 | export function concat(args: any[]) { 3 | return args.join(""); 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | GlimmerAnalysis, 3 | GlimmerAnalyzer, 4 | AttributeContainer, 5 | } from "./Analyzer"; 6 | export { GlimmerRewriter, GlimmerStyleMapping } from "./Rewriter"; 7 | export { ResolvedFile, TEMPLATE_TYPE } from "./Template"; 8 | export { cssBlocksHelpers } from "./helpers"; 9 | export { ElementAnalyzer } from "./ElementAnalyzer"; 10 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures.ts: -------------------------------------------------------------------------------- 1 | import * as path from "path"; 2 | 3 | function fixture(fixturePath: string) { 4 | let p = path.resolve(__dirname, "..", "..", "..", "test", "fixtures", fixturePath); 5 | return p; 6 | } 7 | 8 | const moduleConfig = require("@glimmer/application-pipeline/dist/lib/broccoli/default-module-configuration.js").default; 9 | moduleConfig.types.stylesheet = { definitiveCollection: "components" }; 10 | moduleConfig.collections.components.types.push("stylesheet"); 11 | 12 | export { 13 | moduleConfig, 14 | fixture, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "basic-app" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/ferret-launcher/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/README.md -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/component.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/-utils/ignore-me.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/-utils/ignore-me.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/component.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/ignore-me.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/ignore-me.d.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{#if launchFerrets}} 4 | 5 | {{/if}} 6 |
7 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/titleize.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/titleize.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/page-banner/user-avatar/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | Hello world 3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/my-app/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/text-editor/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/text-editor/component.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/text-editor/template.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/text-editor/template.hbs -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/components/with-component-helper/template.hbs: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/basic-app/src/ui/index.html -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/readme-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "readme-app" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/readme-app/src/ui/components/page-layout/grid.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | width: 100%; 3 | } 4 | .one-fifth { 5 | width: 20%; 6 | } 7 | .one-fifth[gutter="right"] { 8 | width: calc(20% - 20px); 9 | margin-right: 20px; 10 | } 11 | .four-fifths { 12 | width: 80%; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/readme-app/src/ui/components/page-layout/stylesheet.css: -------------------------------------------------------------------------------- 1 | @block grid from "./grid.css"; 2 | :scope { color: red; width: 100vw; } 3 | :scope[loading] { color: blue } 4 | .sidebar { float: left; } 5 | .sidebar[collapsed] { display: none; } 6 | .main { border-right: 2px groove gray; } 7 | .recommended { background-color: orange } 8 | 9 | @export grid; -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/readme-app/src/ui/components/page-layout/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 4 |
5 |
6 |
-------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/readme-app/src/ui/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/readme-app/src/ui/index.html -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "styled-app" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/ferret-launcher/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/README.md -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/component.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/-utils/ignore-me.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/-utils/ignore-me.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/component.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/ignore-me.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/ignore-me.d.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{#if launchFerrets}} 4 | 5 | {{/if}} 6 |
7 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/titleize.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/titleize.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/page-banner/user-avatar/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | Hello world 3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/stylesheet.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | } 4 | 5 | :scope[is-loading] { 6 | color: blue; 7 | } 8 | 9 | .editor { 10 | display: block; 11 | } 12 | .editor[disabled] { 13 | pointer-events: none; 14 | } -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/my-app/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/style-of-unsupported/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: 18px; 3 | } 4 | 5 | .emphasis { 6 | font-style: italic; 7 | } 8 | 9 | .emphasis[style=bold] { 10 | font-weight: bold; 11 | } 12 | 13 | .emphasis[style=italic] { 14 | font-style: italic; 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/style-of-unsupported/stylesheet.css: -------------------------------------------------------------------------------- 1 | @export h from "./header.css"; 2 | 3 | :scope { 4 | color: red; 5 | } 6 | 7 | .world { 8 | border: 1px solid black; 9 | } 10 | 11 | .world[thick] { 12 | border-width: 3px; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/style-of-unsupported/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, !

3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/text-editor/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/text-editor/component.ts -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/text-editor/template.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/text-editor/template.hbs -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-block-aliases/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | block-alias: "my-header-alias"; 3 | font-size: 18px; 4 | } 5 | 6 | .emphasis { 7 | block-alias: "stylesheet__world"; 8 | font-style: italic; 9 | } 10 | 11 | .emphasis[style=bold] { 12 | font-weight: bold; 13 | } 14 | 15 | .emphasis[style=italic] { 16 | font-style: italic; 17 | } 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-block-aliases/stylesheet.css: -------------------------------------------------------------------------------- 1 | @export h from "./header.css"; 2 | 3 | :scope { 4 | block-alias: my-scope-alias stylesheet__world; 5 | color: red; 6 | } 7 | 8 | .world { 9 | block-alias: stylesheet__world--thick; 10 | border: 1px solid black; 11 | } 12 | 13 | .world[thick] { 14 | block-alias: my-alias-for-state; 15 | border-width: 3px; 16 | } 17 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-block-aliases/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, World!

3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-classes/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: 18px; 3 | } 4 | 5 | .emphasis { 6 | color: black; 7 | } 8 | 9 | .emphasis[style=bold] { 10 | font-weight: bold; 11 | } 12 | 13 | .emphasis[style=italic] { 14 | font-style: italic; 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-classes/stylesheet.css: -------------------------------------------------------------------------------- 1 | @block h from "./header.css"; 2 | @block t from "./typography.css"; 3 | 4 | :scope { 5 | color: red; 6 | } 7 | 8 | .world { 9 | border: 1px solid black; 10 | } 11 | 12 | .world[thick] { 13 | border-width: 3px; 14 | } 15 | 16 | .planet { 17 | border: 3px groove gray; 18 | } 19 | 20 | @export (h, t); -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-classes/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, World!

3 |
World
4 |
World
5 |
World
6 |

Dynamic Scope

7 |
8 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-classes/typography.css: -------------------------------------------------------------------------------- 1 | .underline { 2 | text-decoration: underline; 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-inherited-states/grandparent.css: -------------------------------------------------------------------------------- 1 | :scope[style=open] { 2 | padding: 2em; 3 | } 4 | 5 | :scope[style=condensed] { 6 | padding: 0.5em; 7 | } 8 | 9 | :scope[style=normal] { 10 | padding: 1em; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-inherited-states/parent.css: -------------------------------------------------------------------------------- 1 | @block grandparent from "./grandparent.css"; 2 | 3 | :scope { 4 | extends: grandparent; 5 | } 6 | 7 | :scope[style=open] { 8 | margin: 1em; 9 | } 10 | 11 | :scope[style=normal] { 12 | margin: 0.5em; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-inherited-states/stylesheet.css: -------------------------------------------------------------------------------- 1 | @block parent from "./parent.css"; 2 | 3 | :scope { 4 | extends: parent; 5 | } 6 | 7 | :scope[style=open] { 8 | line-height: 2em; 9 | } 10 | 11 | :scope[style=spacious] { 12 | line-height: 3em; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-inherited-states/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | Inheritance Test 3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-states/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: 18px; 3 | } 4 | 5 | .emphasis { 6 | font-style: italic; 7 | } 8 | 9 | .emphasis[style=bold] { 10 | font-weight: bold; 11 | } 12 | 13 | .emphasis[style=italic] { 14 | font-style: italic; 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-states/stylesheet.css: -------------------------------------------------------------------------------- 1 | @export h from "./header.css"; 2 | 3 | :scope { 4 | color: red; 5 | } 6 | 7 | .world { 8 | border: 1px solid black; 9 | } 10 | 11 | .world[thick] { 12 | border-width: 3px; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-dynamic-states/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, World!

3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-link-to/external.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | block-name: external; 3 | background: #ccc; 4 | } 5 | 6 | .link-1 { 7 | background: blue; 8 | } 9 | 10 | .link-3 { 11 | color: pink; 12 | } 13 | 14 | .link-3[active] { 15 | color: purple 16 | } -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-link-to/stylesheet.css: -------------------------------------------------------------------------------- 1 | @block external from "./external.css"; 2 | @export util from "./util.css"; 3 | 4 | :scope { 5 | extends: external; 6 | color: red; 7 | } 8 | 9 | .link-1 { 10 | color: yellow; 11 | } 12 | 13 | .link-2 { 14 | color: green; 15 | } 16 | 17 | .link-2[active] { 18 | color: blue; 19 | } 20 | 21 | .link-4 { 22 | color: gray; 23 | } 24 | 25 | .link-4[active] { 26 | color: green; 27 | } 28 | 29 | .link-4[loading] { 30 | color: yellow; 31 | } 32 | 33 | .link-4[disabled] { 34 | color: red; 35 | } 36 | 37 | @export external; -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-link-to/util.css: -------------------------------------------------------------------------------- 1 | .util { 2 | border: 1px solid blue; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-multiple-blocks/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: 18px; 3 | } 4 | 5 | .emphasis { 6 | font-style: italic; 7 | } 8 | 9 | .emphasis[extra] { 10 | font-weight: bold; 11 | } -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-multiple-blocks/stylesheet.css: -------------------------------------------------------------------------------- 1 | @block h from "header.css"; 2 | 3 | :scope { 4 | color: red; 5 | } 6 | 7 | .world { 8 | border: 1px solid black; 9 | } 10 | 11 | .world[thick] { 12 | border-width: 3px; 13 | } 14 | 15 | @export h; -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-multiple-blocks/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, World!

3 |
-------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-helper/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: 18px; 3 | } 4 | 5 | .emphasis { 6 | font-style: italic; 7 | } 8 | 9 | .emphasis[style=bold] { 10 | font-weight: bold; 11 | } 12 | 13 | .emphasis[style=italic] { 14 | font-style: italic; 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-helper/stylesheet.css: -------------------------------------------------------------------------------- 1 | @export h from "./header.css"; 2 | 3 | :scope { 4 | color: red; 5 | } 6 | 7 | .world { 8 | border: 1px solid black; 9 | } 10 | 11 | .world[thick] { 12 | border-width: 3px; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-helper/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, !

3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-helper/templateHash.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, !

3 |
4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-helper/templateInvalid.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, !

3 |
-------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-of-subexpression/header.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-size: 18px; 3 | } 4 | 5 | .emphasis { 6 | font-style: italic; 7 | } 8 | 9 | .emphasis[style=bold] { 10 | font-weight: bold; 11 | } 12 | 13 | .emphasis[style=italic] { 14 | font-style: italic; 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-of-subexpression/stylesheet.css: -------------------------------------------------------------------------------- 1 | @export h from "./header.css"; 2 | 3 | :scope { 4 | color: red; 5 | } 6 | 7 | .world { 8 | border: 1px solid black; 9 | } 10 | 11 | .world[thick] { 12 | border-width: 3px; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/components/with-style-of-subexpression/template.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Hello, 3 | {{yield (hash 4 | classnames=(hash 5 | action=(style-of block:class="world" h:class="emphasis" block:thick=isThick h:style=textStyle) 6 | ) 7 | )}} 8 |

9 |
10 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/glimmer/test/fixtures/styled-app/src/ui/index.html -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | dist/test/*.js -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "removeComments": false, 5 | "outDir": "../dist" 6 | }, 7 | "include": [ 8 | "../src", 9 | "." 10 | ], 11 | "exclude": [ 12 | "../sanity", 13 | "../dist", 14 | "../node_modules", 15 | "mocha.opts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/tsconfig.amd.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist/amd/src/helpers", 5 | "baseUrl": "dist/amd/src/helpers", 6 | "lib": ["ES5"], 7 | "target": "es5", 8 | "module": "amd" 9 | }, 10 | "include": [ 11 | "src/helpers" 12 | ], 13 | "exclude": [ 14 | "sanity", 15 | "dist", 16 | "node_modules" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist/cjs", 6 | "baseUrl": "dist/cjs" 7 | }, 8 | "references": [ 9 | {"path": "../core"} 10 | ], 11 | "include": [ 12 | "src", 13 | "test", 14 | ], 15 | "exclude": [ 16 | "sanity", 17 | "dist", 18 | "node_modules" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/glimmer/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "Idents", 4 | "Opti", 5 | "Rewritable", 6 | "cssblock", 7 | "deserialize", 8 | "objstr", 9 | "opticss", 10 | "truthy" 11 | ], 12 | "cSpell.ignorePaths": [ 13 | "**/node_modules/**", 14 | "**/vscode-extension/**", 15 | "**/.git/**", 16 | ".vscode", 17 | "typings", 18 | "package.json" 19 | ], 20 | "tslint.packageManager": "yarn", 21 | "npm.packageManager": "yarn", 22 | "tslint.enable": true 23 | } -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "compile", 8 | "type": "npm", 9 | "script": "compile", 10 | "problemMatcher": [] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/src/Analyzer/types.ts: -------------------------------------------------------------------------------- 1 | import { ElementAnalysis } from "@css-blocks/core"; 2 | import { ObjectDictionary } from "@opticss/util"; 3 | import { Expression } from "babel-types"; 4 | 5 | export type BooleanExpression = Expression; 6 | export type StringExpression = Expression; 7 | export type TernaryExpression = Expression; 8 | 9 | export type JSXElementAnalysis = ElementAnalysis; 10 | export type Flags = ObjectDictionary; 11 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/src/Analyzer/visitors/index.ts: -------------------------------------------------------------------------------- 1 | export { importVisitor } from "./importer"; 2 | export { elementVisitor } from "./element"; 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/src/index.ts: -------------------------------------------------------------------------------- 1 | export { CSSBlocksJSXAnalyzer as Analyzer, AnalyzerOptions } from "./Analyzer"; 2 | export { CSSBlocksJSXTransformer as Rewriter } from "./transformer"; 3 | export { JSXOptions as Options, JSXOptionsReader as OptionReader } from "./options"; 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/src/styleFunctions/common.ts: -------------------------------------------------------------------------------- 1 | import { CallExpression } from "babel-types"; 2 | 3 | import { JSXAnalysis } from "../Analyzer"; 4 | import { JSXElementAnalysis } from "../Analyzer/types"; 5 | 6 | export type StyleFunctionAnalyzer = ( 7 | analyzer: JSXAnalysis, 8 | element: JSXElementAnalysis, 9 | filename: string, 10 | styleFn: StyleFunctionType, 11 | func: CallExpression, 12 | ) => void; 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/src/utils/isBlockFilename.ts: -------------------------------------------------------------------------------- 1 | import * as minimatch from "minimatch"; 2 | const BLOCK_PATTERN = new minimatch.Minimatch("*.block.*", { matchBase: true }); 3 | export function isBlockFilename(filename: string): boolean { 4 | return BLOCK_PATTERN.match(filename); 5 | } 6 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/src/utils/isConsoleLogStatement.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Node, 3 | isCallExpression, 4 | isIdentifier, 5 | isMemberExpression, 6 | } from "babel-types"; 7 | 8 | export function isConsoleLogStatement(node: Node): boolean { 9 | if (isCallExpression(node)) { 10 | if (node.callee) { 11 | let callee = node.callee; 12 | if (isMemberExpression(callee) && isIdentifier(callee.object) && callee.object.name === "console") { 13 | return true; 14 | } 15 | } 16 | } 17 | return false; 18 | } 19 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/cssblocks.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.block.css' { 2 | export let states: any; 3 | let block: any; 4 | export default block; 5 | } 6 | 7 | declare module 'obj-str' { 8 | function objstr(o: any): string; 9 | export default objstr; 10 | } 11 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/basic-multifile/blocks/bar.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/basic-multifile/blocks/foo.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/basic-multifile/components/awesome-component.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import { h } from 'preact'; 3 | import foo from '../blocks/foo.block.css'; 4 | 5 | export default function render(){ 6 | return (
); 7 | } 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/basic-multifile/index.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import bar from './blocks/bar.block.css'; 3 | import { h } from 'preact'; 4 | import objstr from 'obj-str'; 5 | import Awesome from './components/awesome-component'; 6 | 7 | let style = objstr({ 8 | [bar.pretty]: true, 9 | [bar.pretty.color('yellow')]: false 10 | }); 11 | 12 | export default function() { 13 | return (
); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/conflicting-local-multifile/blocks/bar.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/conflicting-local-multifile/blocks/foo.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/conflicting-local-multifile/components/awesome-component.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import { h } from 'preact'; 3 | import bar from '../blocks/foo.block.css'; 4 | 5 | export default function render(){ 6 | return (
); 7 | } 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/conflicting-local-multifile/index.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import bar from './blocks/bar.block.css'; 3 | import { h } from 'preact'; 4 | import objstr from 'obj-str'; 5 | import Awesome from './components/awesome-component'; 6 | 7 | let style = objstr({ 8 | [bar.pretty]: true, 9 | [bar.pretty.color('yellow')]: false 10 | }); 11 | 12 | export default function() { 13 | return (
); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/deep-multifile/blocks/bar.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/deep-multifile/blocks/baz.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/deep-multifile/blocks/foo.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/deep-multifile/components/awesome-component-two.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import { h } from 'preact'; 3 | import baz from '../blocks/baz.block.css'; 4 | 5 | export interface Props { 6 | children?: any 7 | } 8 | 9 | export default function render(props: Props){ 10 | return (
{props.children}
); 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/deep-multifile/components/awesome-component.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import { h } from 'preact'; 3 | import foo from '../blocks/foo.block.css'; 4 | import AwesomeTwo from './awesome-component-two'; 5 | 6 | export default function render(){ 7 | return (
); 8 | } 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/deep-multifile/index.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import bar from './blocks/bar.block.css'; 3 | import { h } from 'preact'; 4 | import objstr from 'obj-str'; 5 | import Awesome from './components/awesome-component'; 6 | 7 | let style = objstr({ 8 | [bar.pretty]: true, 9 | [bar.pretty.color('yellow')]: false 10 | }); 11 | 12 | export default function() { 13 | return (
); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/duplicate-blocks-multifile/blocks/bar.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/duplicate-blocks-multifile/blocks/foo.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: blue; 3 | } 4 | 5 | .pretty { 6 | color: red; 7 | } 8 | 9 | .pretty[color=yellow] { 10 | color: yellow; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/duplicate-blocks-multifile/components/awesome-component.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import { h } from 'preact'; 3 | import bar from '../blocks/bar.block.css'; 4 | 5 | export default function render(){ 6 | return (
); 7 | } 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/fixtures/duplicate-blocks-multifile/index.tsx: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | import bar from './blocks/bar.block.css'; 3 | import { h } from 'preact'; 4 | import objstr from 'obj-str'; 5 | import Awesome from './components/awesome-component'; 6 | 7 | let style = objstr({ 8 | [bar.pretty]: true, 9 | [bar.pretty.color('yellow')]: false 10 | }); 11 | 12 | export default function() { 13 | return (
); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/jsx/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | node_modules 3 | .vscode-test 4 | *.tsbuildinfo 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | **/*.ts 3 | **/*.map 4 | .gitignore 5 | **/tsconfig.json 6 | **/tsconfig.base.json 7 | contributing.md 8 | .travis.yml 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/createBlockFactory.ts: -------------------------------------------------------------------------------- 1 | import { BlockFactory, Options } from "@css-blocks/core"; 2 | import { postcss } from "opticss"; 3 | 4 | export function createBlockFactory(config: Options) { 5 | return new BlockFactory(config, postcss); 6 | } 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/pathTransformers/PathTransformer.ts: -------------------------------------------------------------------------------- 1 | export interface PathTransformer { 2 | templateToBlock(templatePath: string): string | null; 3 | blockToTemplate(blockPath: string): string | null; 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/run.ts: -------------------------------------------------------------------------------- 1 | import { ProposedFeatures, TextDocuments, createConnection } from "vscode-languageserver"; 2 | 3 | import { Server } from "./Server"; 4 | 5 | const connection = createConnection(ProposedFeatures.all); 6 | const documents = new TextDocuments(); 7 | 8 | let server = new Server(connection, documents); 9 | 10 | server.listen(); 11 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/serverCapabilities.ts: -------------------------------------------------------------------------------- 1 | import { ServerCapabilities, TextDocumentSyncKind } from "vscode-languageserver"; 2 | 3 | export const SERVER_CAPABILITIES: ServerCapabilities = { 4 | textDocumentSync: TextDocumentSyncKind.Full, 5 | definitionProvider: true, 6 | // TODO: implement support for this for showing documentation 7 | // hoverProvider: true, 8 | documentLinkProvider: { 9 | resolveProvider: true, 10 | }, 11 | documentSymbolProvider: false, 12 | completionProvider: { 13 | resolveProvider: false, 14 | triggerCharacters: [ ":", '"', "=", "/" ], 15 | }, 16 | referencesProvider: true, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic-scss/styles/blocks/block-with-errors.block.scss: -------------------------------------------------------------------------------- 1 | .a { 2 | text-decoration: none; 3 | } 4 | 5 | .a.b { 6 | display: inline; 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic-scss/styles/blocks/utils.block.scss: -------------------------------------------------------------------------------- 1 | .display-flex { 2 | display: flex; 3 | } 4 | 5 | .display-block { 6 | display: block; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic-scss/styles/components/a.block.scss: -------------------------------------------------------------------------------- 1 | @block utils from "../blocks/utils.block.scss"; 2 | 3 | .a-1 { 4 | vertical-align: top; 5 | } 6 | 7 | .a-2 { 8 | vertical-align: middle; 9 | } 10 | 11 | .a-3 { 12 | color: red; 13 | } 14 | 15 | .a-3[whuut] { 16 | vertical-align: bottom; 17 | } 18 | 19 | @export utils; 20 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic-scss/styles/components/import-completions.block.scss: -------------------------------------------------------------------------------- 1 | @block randoBlock from "../"; 2 | @export utils from "../blocks/"; 3 | @block aBlock from "../blocks/ut"; 4 | @export bBlock from "./"; 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic-scss/templates/components/a.hbs: -------------------------------------------------------------------------------- 1 |

lorem

2 | 3 |
6 |
7 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic/styles/blocks/block-with-errors.block.css: -------------------------------------------------------------------------------- 1 | .a { 2 | text-decoration: none; 3 | } 4 | 5 | .a.b { 6 | display: inline; 7 | } -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic/styles/blocks/utils.block.css: -------------------------------------------------------------------------------- 1 | .display-flex { 2 | display: flex; 3 | } 4 | 5 | .display-block { 6 | display: block; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic/styles/components/a.block.css: -------------------------------------------------------------------------------- 1 | @block utils from "../blocks/utils.block.css"; 2 | 3 | .a-1 { 4 | vertical-align: top; 5 | } 6 | 7 | .a-2 { 8 | vertical-align: middle; 9 | } 10 | 11 | .a-3 { 12 | color: red; 13 | } 14 | 15 | .a-3[whuut] { 16 | vertical-align: bottom; 17 | } 18 | 19 | @export utils; 20 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic/styles/components/import-completions.block.css: -------------------------------------------------------------------------------- 1 | @block randoBlock from "../"; 2 | @export utils from "../blocks/"; 3 | @block aBlock from "../blocks/ut"; 4 | @export bBlock from "./"; 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/fixtures/ember-classic/templates/components/a.hbs: -------------------------------------------------------------------------------- 1 |

lorem

2 | 3 |
6 |
7 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | --recursive 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/util/TestStream.ts: -------------------------------------------------------------------------------- 1 | import { Duplex } from "stream"; 2 | 3 | // NOTE: This approach is taken directly from the vscode-languageserver test suite 4 | // https://github.com/microsoft/vscode-languageserver-node/blob/9382cd374845693b37e6c0913426205a2302dbeb/server/src/test/connection.test.ts 5 | export class TestStream extends Duplex { 6 | _write(chunk: string, _encoding: string, done: () => void) { 7 | this.emit("data", chunk); 8 | done(); 9 | } 10 | _read(_size: number) { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/test/util/createTextDocumentsMock.ts: -------------------------------------------------------------------------------- 1 | import { TextDocuments } from "vscode-languageserver"; 2 | import { TextDocument } from "vscode-languageserver-types"; 3 | 4 | export function createTextDocumentsMock(documentsMap: Map): TextDocuments { 5 | class TextDocumentsMock extends TextDocuments { 6 | get(uri: string): TextDocument | undefined { 7 | let textDocument = documentsMap.get(uri); 8 | return textDocument; 9 | } 10 | } 11 | 12 | return new TextDocumentsMock(); 13 | } 14 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/src/types/glob-escape.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'glob-escape' { 2 | const globEscape: (string) => string; 3 | export = globEscape; 4 | } -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "baseUrl": "dist", 6 | "target": "es2018", 7 | "outDir": "dist", 8 | "rootDir": "src", 9 | "lib": ["es2018"] 10 | }, 11 | "include": ["src", "src/test"], 12 | "exclude": ["dist", "node_modules", ".vscode-test"], 13 | "references": [{ "path": "../core" }] 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/language-server/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/runtime/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/runtime/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | --recursive 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/runtime/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/runtime/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style", 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/runtime/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/test-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./mock-fs"; 2 | -------------------------------------------------------------------------------- /packages/@css-blocks/test-utils/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | --recursive 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/test-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist" 7 | }, 8 | "include": [ 9 | "src", 10 | "test" 11 | ], 12 | "exclude": [ 13 | "sanity", 14 | "dist", 15 | "node_modules" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/test-utils/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/test-utils/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/test-utils/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | node_modules 3 | client/server 4 | .vscode-test 5 | *.tsbuildinfo 6 | !.vscode/ 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | **/*.ts 3 | **/*.map 4 | .gitignore 5 | **/tsconfig.json 6 | **/tsconfig.base.json 7 | contributing.md 8 | .travis.yml 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/README.md: -------------------------------------------------------------------------------- 1 | # CSS Blocks + Ember Plugin for VS Code 2 | 3 | This plugin provides a language server for CSS Blocks users with Ember 4 | applications. It is still a work in progress. The following features are 5 | currently provided: 6 | 7 | * Code Lens for styles referenced in a template. 8 | * Code completion for style references in handlebars files. 9 | * Go to definition for styles referenced in a template. 10 | * Go to file for `@block` and `@export` directives in CSS Block files. 11 | * Error highlighting in CSS Block files. 12 | * Error highlighting of CSS Block related errors in handlebars files. -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/css-blocks.css-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1.1, 3 | "atDirectives": [ 4 | { 5 | "name": "@block", 6 | "description": "Import a block reference for use within another block" 7 | }, 8 | { 9 | "name": "@export", 10 | "description": "Export a block reference to expose it to the template context of the current block" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/fixtures/app/css-blocks.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | disablePreprocessChaining: true, 3 | }; -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/fixtures/app/styles/nav.block.css: -------------------------------------------------------------------------------- 1 | @export subnav from "./subnav.block.css"; 2 | 3 | :scope { 4 | color: red; 5 | } 6 | 7 | .foo { 8 | color: green; 9 | } 10 | 11 | .foo[is-bar] { 12 | color: blue; 13 | } 14 | 15 | .foo[isometric="left"] { 16 | border-left-width: 1px; 17 | } 18 | 19 | .foo[isometric="right"] { 20 | border-right-width: 1px; 21 | } -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/fixtures/app/styles/not-css-block.css: -------------------------------------------------------------------------------- 1 | .foo.bar { 2 | color: green; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/fixtures/app/styles/subnav.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | border: 1px solid black; 3 | border-top-width: 0px; 4 | } 5 | 6 | :scope[open] { 7 | display: block; 8 | } 9 | 10 | .asdf { 11 | color: red; 12 | } 13 | 14 | .asdf[qwerty] { 15 | color: blue; 16 | } 17 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/fixtures/app/templates/nav.hbs: -------------------------------------------------------------------------------- 1 |

-------------------------------------------------------------------------------- /packages/@css-blocks/vscode/scripts/e2e.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export CODE_TESTS_PATH="$(pwd)/client/out/test" 4 | export CODE_TESTS_WORKSPACE="$(pwd)/client/testFixture" 5 | 6 | node "$(pwd)/client/node_modules/vscode/bin/test" -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/src/test/index.ts: -------------------------------------------------------------------------------- 1 | import * as testRunner from 'vscode/lib/testrunner'; 2 | 3 | testRunner.configure({ 4 | ui: 'bdd', 5 | useColors: true, 6 | timeout: 100000 7 | }); 8 | 9 | module.exports = testRunner; 10 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/testFixture/completion.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/vscode/testFixture/completion.txt -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/testFixture/diagnostics.txt: -------------------------------------------------------------------------------- 1 | ANY browsers, ANY OS. -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "baseUrl": "dist", 6 | "outDir": "dist", 7 | "rootDir": "src", 8 | }, 9 | "include": ["src", "test"], 10 | "exclude": ["dist", "node_modules", ".vscode-test"], 11 | "references": [{ "path": "../language-server" }] 12 | } 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/vscode/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | docs/ 4 | coverage/ 5 | build/ 6 | test/fixtures/output 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/dist/**/*": true, 5 | "**/*.lock": true 6 | }, 7 | "editor.tabSize": 2 8 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/NOTICE.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 LinkedIn Corporation 2 | All Rights Reserved. 3 | 4 | Licensed under the BSD 2-Clause License (the "License"). 5 | See LICENSE in the project root for license information. 6 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/examples/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | EXAMPLES=jsx 4 | 5 | for example in $EXAMPLES; do 6 | cd $example 7 | rm -rf node_modules/@css-blocks 8 | yarn && yarn build || exit 1 9 | cd - 10 | done 11 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/examples/jsx/.gitignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | !dist/index.html 3 | node_modules 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/examples/jsx/readme.md: -------------------------------------------------------------------------------- 1 | # css-blocks-hello-world 2 | 3 | React Integration Example 4 | 5 | ## Run 6 | `npm run build` and open `/dist/index.html` 7 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/examples/jsx/src/Button.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: white; 3 | background-color: gray; 4 | } 5 | 6 | :scope[active] { 7 | background-color: red; 8 | } 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/examples/jsx/src/index.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: green; 3 | } 4 | 5 | .unusedStyle { 6 | background-color: papayawhip; 7 | } 8 | 9 | :scope[test] { 10 | color: blue; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/examples/jsx/src/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import Button from './Button'; 4 | 5 | import styles from './index.block.css'; 6 | 7 | ReactDOM.render( 8 |
Hello CSS Blocks!
, 9 | document.getElementById('app') 10 | ); 11 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/src/LoaderOptions.ts: -------------------------------------------------------------------------------- 1 | import { ObjectDictionary } from "@opticss/util"; 2 | 3 | import { WebpackAny } from "./Plugin"; 4 | export type LoaderOptions = ObjectDictionary; 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/src/context.ts: -------------------------------------------------------------------------------- 1 | import { Options } from "@css-blocks/core"; 2 | import { ObjectDictionary } from "@opticss/util"; 3 | import { loader } from "webpack"; 4 | 5 | import { PendingResult } from "./Plugin"; 6 | 7 | export interface CssBlocksContext { 8 | mappings: ObjectDictionary; 9 | compilationOptions: Partial>; 10 | } 11 | 12 | export interface LoaderContext extends loader.LoaderContext { 13 | cssBlocks: CssBlocksContext; 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./loader"; 2 | export * from "./LoaderOptions"; 3 | export * from "./Plugin"; 4 | export * from "./CssAssets"; 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/configs/defaultOutputConfig.ts: -------------------------------------------------------------------------------- 1 | import * as path from "path"; 2 | import { Configuration as WebpackConfiguration } from "webpack"; 3 | 4 | import { DIST_DIRECTORY } from "../util/testPaths"; 5 | 6 | export function config(outputPath?: string): WebpackConfiguration { 7 | outputPath = outputPath || path.join(DIST_DIRECTORY, "test_output"); 8 | return { 9 | output: { 10 | path: outputPath, 11 | filename: "bundle.js", 12 | libraryTarget: "commonjs2", 13 | }, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/concat-1.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: black; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/concat-2.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/concat.template.css: -------------------------------------------------------------------------------- 1 | .a { 2 | color: black; 3 | } 4 | .b { 5 | color: red; 6 | } 7 | /*# sourceMappingURL=css-blocks.css.map */ -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/concat.template.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../test/test/fixtures/blocks/concat-1.block.css","../../test/test/fixtures/blocks/concat-2.block.css"],"names":[],"mappings":"AAAA;EACE,aAAa;CACd;ACFD;EACE,WAAW","file":"x","sourcesContent":[":scope {\n color: black;\n}",":scope {\n color: red;\n}"]} -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/has-reference.block.css: -------------------------------------------------------------------------------- 1 | @block ref from "is-referenced.block.css"; 2 | @block-debug ref to comment; -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/has-reference.css: -------------------------------------------------------------------------------- 1 | /* Source: FIXTURES_DIRECTORY/is-referenced.block.css 2 | :scope => .is-referenced 3 | :scope[active] => .is-referenced--active */ -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/hello.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | hello: world; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/hello.css: -------------------------------------------------------------------------------- 1 | .hello { 2 | hello: world; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/blocks/is-referenced.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: red; 3 | } 4 | [active] { 5 | color: yellow; 6 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/fixtures/javascripts/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = {} -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --require source-map-support/register 3 | --inline-diffs 4 | 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/util/TestAnalyzer.ts: -------------------------------------------------------------------------------- 1 | import { Analyzer } from "@css-blocks/core"; 2 | 3 | export class TestAnalyzer extends Analyzer<"WebpackPlugin.TestTemplate"> { 4 | analyze() { return Promise.resolve(this); } 5 | get optimizationOptions() { 6 | return { 7 | rewriteIdents: { 8 | id: false, 9 | class: true, 10 | omitIdents: { 11 | id: [], 12 | class: [], 13 | }, 14 | }, 15 | analyzedAttributes: ["class"], 16 | analyzedTagnames: false, 17 | }; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/util/assertError.ts: -------------------------------------------------------------------------------- 1 | import cssBlocks = require("@css-blocks/core"); 2 | import { assert } from "chai"; 3 | import { postcss } from "opticss"; 4 | 5 | export function assertError(errorType: typeof cssBlocks.CssBlockError, message: string, promise: postcss.LazyResult) { 6 | return promise.then( 7 | () => { 8 | assert(false, `Error ${errorType.name} was not raised.`); 9 | }, 10 | (reason) => { 11 | assert(reason instanceof errorType, reason.toString()); 12 | assert.deepEqual(reason.message, message); 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/test/util/testPaths.ts: -------------------------------------------------------------------------------- 1 | import * as path from "path"; 2 | 3 | export const DIST_DIRECTORY = path.resolve(__dirname, "..", ".."); 4 | export const FIXTURES_DIRECTORY = path.resolve(DIST_DIRECTORY, "..", "test", "fixtures"); 5 | export const BLOCK_FIXTURES_DIRECTORY = path.resolve(FIXTURES_DIRECTORY, "blocks"); 6 | export const BLOCK_LOADER_PATH = require.resolve("../../src/loader.js"); 7 | export const WEBPACK_DEV_SERVER_PATH = path.join(__dirname, "node_modules", "webpack-dev-server", "client", "index?http://localhost:8080"); 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "dist", 6 | "baseUrl": "dist", 7 | "paths": { 8 | "loader-utils": [ 9 | "../../../../types-local/loader-utils" 10 | ] 11 | } 12 | }, 13 | "references": [ 14 | {"path": "../core"} 15 | ], 16 | "include": [ 17 | "src", 18 | "test" 19 | ], 20 | "exclude": [ 21 | "dist", 22 | "node_modules" 23 | ] 24 | } -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/tslint.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.cli.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@css-blocks/code-style" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/webpack/tslint.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/tslint", 3 | "extends": "@css-blocks/code-style/configs/tslint.release.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | public/api -------------------------------------------------------------------------------- /packages/@css-blocks/website/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`; 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/local-types/import-css.d.ts: -------------------------------------------------------------------------------- 1 | // Allow webpack imports of css files. 2 | declare module '*.css' { 3 | export let block: any; 4 | export default block; 5 | } 6 | declare module '*.scss' { 7 | export let block: any; 8 | export default block; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/local-types/import-img.d.ts: -------------------------------------------------------------------------------- 1 | // Allow webpack imports of image files. 2 | declare module '*.svg' { 3 | export let uri: string; 4 | export default uri; 5 | } 6 | declare module '*.png' { 7 | export let uri: string; 8 | export default uri; 9 | } 10 | declare module '*.jpg' { 11 | export let uri: string; 12 | export default uri; 13 | } 14 | declare module '*.jpeg' { 15 | export let uri: string; 16 | export default uri; 17 | } 18 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/local-types/obj-str.d.ts: -------------------------------------------------------------------------------- 1 | declare module "obj-str" { 2 | function objstr(o: any): string; 3 | export default objstr; 4 | } -------------------------------------------------------------------------------- /packages/@css-blocks/website/public/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteCond %{HTTPS} !=on 3 | RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 4 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/website/public/favicon.ico -------------------------------------------------------------------------------- /packages/@css-blocks/website/public/google025ea9ca935dea1b.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google025ea9ca935dea1b.html -------------------------------------------------------------------------------- /packages/@css-blocks/website/public/images/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/packages/@css-blocks/website/public/images/bug.png -------------------------------------------------------------------------------- /packages/@css-blocks/website/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rsync -rlvz -R build/./ cssblocks@css-blocks.com:css-blocks.com 3 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const app = express(); 3 | 4 | app.use("/", express.static("./build")); 5 | 6 | app.listen(4000, () => console.log("Example app listening on port 4000")); -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import registerServiceWorker from './registerServiceWorker'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | registerServiceWorker(); 8 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/pages/Demo.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | // import logo from './images/wordmark.svg'; 4 | // import styles from './App.block.css'; 5 | 6 | class Demo extends Component { 7 | render() { 8 | return (

DEMO

); 9 | } 10 | } 11 | 12 | export default Demo; 13 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/pages/Home/test.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | block-name: test-block; 3 | } -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/shared/Prism/Prism.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | width: 100%; 3 | box-sizing: border-box; 4 | border-radius: 0 0 3px 3px; 5 | min-height: 712px; /* Magic number */ 6 | } 7 | 8 | @media (max-width: 520px) { 9 | :scope { 10 | min-height: 0px; 11 | } 12 | } -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/shared/Tooltip/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | import styles from './Tooltip.block.css'; 4 | 5 | interface Props { 6 | label: string; 7 | value: string; 8 | x: number; 9 | y: number; 10 | } 11 | 12 | class Prism extends Component { 13 | 14 | render() { 15 | let { label, value, x, y } = this.props; 16 | return ( 17 |
23 | ); 24 | } 25 | 26 | } 27 | 28 | export default Prism; 29 | -------------------------------------------------------------------------------- /packages/@css-blocks/website/src/styles/grid.block.css: -------------------------------------------------------------------------------- 1 | 2 | .container { 3 | max-width: 1280px; 4 | display: flex; 5 | margin: auto; 6 | padding: 0 18px; 7 | text-align: center; 8 | flex-flow: column; 9 | align-items: center; 10 | } -------------------------------------------------------------------------------- /packages/@css-blocks/website/typedoc-theme/partials/breadcrumb.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | This file has been modified for use on the CSS Blocks website. 3 | --}} 4 | 5 | {{#if parent}} 6 | {{#with parent}}{{> breadcrumb}}{{/with}} 7 |
  • 8 | {{#if url}} 9 | {{name}} 10 | {{else}} 11 | {{name}} 12 | {{/if}} 13 |
  • 14 | {{else}} 15 |
  • 16 | Packages 17 |
  • 18 | {{/if}} -------------------------------------------------------------------------------- /packages/@css-blocks/website/typedoc-theme/templates/index.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | This file has been modified for use on the CSS Blocks website. 3 | --}} 4 |
    5 | {{#markdown}}{{{model.readme}}}{{/markdown}} 6 |
    -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/README.md: -------------------------------------------------------------------------------- 1 | This is a simple ember addon that contains templates and stylesheets that use 2 | CSS Blocks. This addon is consumed by [an ember application](../ember-app) 3 | for testing. -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-addon/addon/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/addon/components/addon-component.js: -------------------------------------------------------------------------------- 1 | import Component from '@ember/component'; 2 | import layout from '../templates/components/addon-component'; 3 | 4 | export default Component.extend({ 5 | layout, 6 | enabled: false, 7 | 8 | actions: { 9 | toggleEnabled() { 10 | this.toggleProperty("enabled"); 11 | } 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/addon/styles/components/addon-component.block.css: -------------------------------------------------------------------------------- 1 | @block (bold) from "@css-blocks-fixtures-v2/npm-based-blocks"; 2 | 3 | :scope { 4 | extends: bold; 5 | block-alias: public-addon-component-alias; 6 | --addon-component-block-scope: applied; 7 | color: red; 8 | } 9 | 10 | .sub-class { 11 | --addon-component-block-class: applied; 12 | color: orange; 13 | } 14 | 15 | :scope[enabled] { 16 | --addon-component-block-scope-state: applied; 17 | color: green; 18 | } 19 | 20 | .sub-class[enabled] { 21 | --addon-component-block-class-state: applied; 22 | color: blue; 23 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/addon/templates/components/addon-component.hbs: -------------------------------------------------------------------------------- 1 |
    2 | Addon Component Scope Styles State: {{enabled}} 3 |
    4 | Addon Component Sub-class Styles State: {{enabled}} 5 |
    6 | 7 |
    -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-addon/app/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/app/components/addon-component.js: -------------------------------------------------------------------------------- 1 | export { default } from '@css-blocks-fixtures-v2/ember-addon/components/addon-component'; -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-addon/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | name: require("./package.json").name, 6 | 7 | isDevelopingAddon() { 8 | return true; 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | 27 | # debug output 28 | /DEBUG/ 29 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/README.md: -------------------------------------------------------------------------------- 1 | This ember application is used to test CSS Blocks' [ember-cli 2 | integration](../../../packages/@css-blocks/ember-cli). 3 | 4 | This is a full application that you can interact with by running `yarn 5 | start`. 6 | 7 | You can run the integration tests to ensure things are working correctly by 8 | running `yarn test`. These tests are ran in CI as well. -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/app/components/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/components/app-component.js: -------------------------------------------------------------------------------- 1 | import Component from '@ember/component'; 2 | import layout from '../templates/components/app-component'; 3 | 4 | export default Component.extend({ 5 | layout, 6 | enabled: false, 7 | 8 | actions: { 9 | toggleEnabled() { 10 | this.toggleProperty("enabled"); 11 | } 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/app/controllers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/controllers/compositions.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | enabled: false, 5 | color: 'none', 6 | 7 | actions: { 8 | toggleEnabled() { 9 | this.toggleProperty("enabled"); 10 | }, 11 | toggleColor() { 12 | this.set('color', this.get('color') === 'none' ? 'yellow' : 'none'); 13 | } 14 | } 15 | }); -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/controllers/node-modules-resolution.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | enabled: false, 5 | 6 | actions: { 7 | toggleEnabled() { 8 | this.toggleProperty("enabled"); 9 | } 10 | } 11 | }); -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/controllers/route-block.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | enabled: false, 5 | 6 | actions: { 7 | toggleEnabled() { 8 | this.toggleProperty("enabled"); 9 | } 10 | } 11 | }); -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/app/helpers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/app/models/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/app/routes/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/addon-component.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/app-component.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/compositions.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/ember-builtins.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/global-styles.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/node-modules-resolution.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/routes/route-block.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/styles/ember-builtins.block.css: -------------------------------------------------------------------------------- 1 | .link-to-helper { 2 | --link-to-helper: applied; 3 | color: red; 4 | } 5 | 6 | .link-to-helper[active] { 7 | --link-to-helper-active: applied; 8 | color: green; 9 | } 10 | 11 | .input-helper { 12 | --input-helper: applied; 13 | } 14 | 15 | .textarea-helper { 16 | --textarea-helper: applied; 17 | } 18 | 19 | .select-helper { 20 | --select-helper: applied; 21 | } 22 | 23 | .button-helper { 24 | --button-helper: applied; 25 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/styles/inherited-compositions.block.css: -------------------------------------------------------------------------------- 1 | @block util from "./utility.block.css"; 2 | 3 | .red { 4 | composes: "util.bold"; 5 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/styles/node-modules-resolution.block.css: -------------------------------------------------------------------------------- 1 | @block (enableable-component) from "@css-blocks-fixtures-v2/npm-based-blocks"; 2 | 3 | :scope { 4 | extends: enableable-component; 5 | } 6 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/styles/route-block.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | --route-block-scope: applied; 3 | color: red; 4 | } 5 | 6 | .sub-class { 7 | --route-block-class: applied; 8 | color: orange; 9 | } 10 | 11 | :scope[enabled] { 12 | --route-block-scope-state: applied; 13 | color: green; 14 | } 15 | 16 | .sub-class[enabled] { 17 | --route-block-class-state: applied; 18 | color: blue; 19 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/styles/utility.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-style: italic; 3 | } 4 | 5 | :scope[pink] { 6 | color: pink; 7 | } 8 | 9 | :scope[purple] { 10 | color: purple; 11 | } 12 | 13 | .red { 14 | color: red; 15 | } 16 | 17 | .green { 18 | color: green; 19 | } 20 | 21 | .orange { 22 | color: orange; 23 | } 24 | 25 | :scope[blue] { 26 | color: blue; 27 | } 28 | 29 | :scope[yellow] { 30 | color: yellow; 31 | } 32 | 33 | .brown { 34 | color: brown; 35 | } 36 | 37 | .bold { 38 | font-weight: bold; 39 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/templates/addon-component.hbs: -------------------------------------------------------------------------------- 1 | {{addon-component}} -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/templates/app-component.hbs: -------------------------------------------------------------------------------- 1 | {{app-component}} 2 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/templates/ember-builtins.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{#link-to "index" block:class="link-to-helper" id="link-to-helper"}}Inactive Link To Helper{{/link-to}} 3 | {{#link-to "ember-builtins" block:class="link-to-helper" id="link-to-helper-active"}}Active Link To Helper{{/link-to}} 4 |
    -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/templates/global-styles.hbs: -------------------------------------------------------------------------------- 1 |
    Global app.css styles makes me purple
    -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/templates/node-modules-resolution.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{!--
    3 | Node Module Resolution Scope Styles State: {{enabled}} 4 |
    5 | Node Module Resolution Sub-Class Styles State: {{enabled}} 6 |
    7 | 8 |
    --}} -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/app/templates/route-block.hbs: -------------------------------------------------------------------------------- 1 |
    2 | Route Scope Styles State: {{enabled}} 3 |
    4 | Route Sub-class Styles State: {{enabled}} 5 |
    6 | 7 |
    -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "jquery-integration": true 3 | } 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/testem.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | test_page: 'tests/index.html?hidepassed&nolint', 3 | disable_watching: true, 4 | // only emit logs for failed tests 5 | // https://github.com/testem/testem#tap-options 6 | tap_quiet_logs: true, 7 | launch_in_ci: [ 8 | 'Chrome' 9 | ], 10 | launch_in_dev: [ 11 | 'Chrome' 12 | ], 13 | browser_args: { 14 | Chrome: [ 15 | '--disable-gpu', 16 | '--headless', 17 | '--remote-debugging-port=9222', 18 | '--window-size=1440,900' 19 | ] 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/tests/helpers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/tests/integration/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/tests/integration/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/tests/integration/helpers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/tests/unit/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-app/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures-ember-v2/ember-app/vendor/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/README.md: -------------------------------------------------------------------------------- 1 | This is a simple ember engine that contains templates and stylesheets that 2 | use CSS Blocks. This engine is consumed by [an ember 3 | application](../ember-app) for testing. -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/addon/engine.js: -------------------------------------------------------------------------------- 1 | import Engine from 'ember-engines/engine'; 2 | import loadInitializers from 'ember-load-initializers'; 3 | import Resolver from './resolver'; 4 | import config from './config/environment'; 5 | 6 | const { modulePrefix } = config; 7 | 8 | const dependencies = { 9 | services: [ 'css-blocks' ], 10 | }; 11 | 12 | const Eng = Engine.extend({ 13 | modulePrefix, 14 | Resolver, 15 | dependencies, 16 | }); 17 | 18 | loadInitializers(Eng, modulePrefix); 19 | 20 | export default Eng; 21 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/addon/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/addon/routes.js: -------------------------------------------------------------------------------- 1 | import buildRoutes from 'ember-engines/routes'; 2 | 3 | export default buildRoutes(function() { 4 | // Define your engine's route map here 5 | }); 6 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/addon/styles/application.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: pink; 3 | --in-repo-eager-engine-scope: applied; 4 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/addon/templates/application.hbs: -------------------------------------------------------------------------------- 1 |
    2 | IN THE ENGINE! 3 | {{#addon-component}}{{/addon-component}} 4 |
    5 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(environment) { 5 | let ENV = { 6 | modulePrefix: '@css-blocks-fixtures-v2/ember-engine', 7 | environment 8 | }; 9 | 10 | return ENV; 11 | }; 12 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | const EngineAddon = require('ember-engines/lib/engine-addon'); 5 | 6 | module.exports = EngineAddon.extend({ 7 | name: require("./package.json").name, 8 | 9 | lazyLoading: { 10 | enabled: false 11 | }, 12 | 13 | isDevelopingAddon() { 14 | return true; 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-engine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "version": "1.5.0", 4 | "name": "@css-blocks-fixtures-v2/ember-engine", 5 | "keywords": [ 6 | "ember-addon", 7 | "ember-engine" 8 | ], 9 | "dependencies": { 10 | "@css-blocks-fixtures-v2/ember-addon": "^1.5.0", 11 | "@css-blocks/ember": "^1.5.0", 12 | "ember-cli-babel": "^7.7.3", 13 | "ember-cli-htmlbars": "^5.2.0" 14 | }, 15 | "devDependencies": { 16 | "broccoli-plugin": "^4.0.0", 17 | "ember-cli": "~3.16.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/README.md: -------------------------------------------------------------------------------- 1 | This is a simple lazy ember engine that contains templates and stylesheets 2 | that use CSS Blocks. This engine is consumed by [an ember 3 | application](../ember-app) for testing. -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/addon/engine.js: -------------------------------------------------------------------------------- 1 | import Engine from 'ember-engines/engine'; 2 | import loadInitializers from 'ember-load-initializers'; 3 | import Resolver from './resolver'; 4 | import config from './config/environment'; 5 | 6 | const { modulePrefix } = config; 7 | 8 | const dependencies = { 9 | services: [ 'css-blocks' ], 10 | }; 11 | 12 | const Eng = Engine.extend({ 13 | modulePrefix, 14 | Resolver, 15 | dependencies, 16 | }); 17 | 18 | loadInitializers(Eng, modulePrefix); 19 | 20 | export default Eng; 21 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/addon/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/addon/routes.js: -------------------------------------------------------------------------------- 1 | import buildRoutes from 'ember-engines/routes'; 2 | 3 | export default buildRoutes(function() { 4 | // Define your engine's route map here 5 | }); 6 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/addon/styles/application.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: yellowgreen; 3 | --in-repo-lazy-engine-scope: applied; 4 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/addon/templates/application.hbs: -------------------------------------------------------------------------------- 1 |
    2 | IN THE LAZY ENGINE! 3 |
    4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(environment) { 5 | let ENV = { 6 | modulePrefix: '@css-blocks-fixtures-v2/ember-lazy-engine', 7 | environment 8 | }; 9 | 10 | return ENV; 11 | }; 12 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | const EngineAddon = require('ember-engines/lib/engine-addon'); 5 | 6 | module.exports = EngineAddon.extend({ 7 | name: require("./package.json").name, 8 | 9 | lazyLoading: { 10 | enabled: true 11 | }, 12 | 13 | isDevelopingAddon() { 14 | return true; 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/ember-lazy-engine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "version": "1.5.0", 4 | "name": "@css-blocks-fixtures-v2/ember-lazy-engine", 5 | "keywords": [ 6 | "ember-addon", 7 | "ember-engine" 8 | ], 9 | "dependencies": { 10 | "@css-blocks/ember": "^1.5.0", 11 | "ember-cli-babel": "^7.7.3", 12 | "ember-cli-htmlbars": "^5.2.0" 13 | }, 14 | "devDependencies": { 15 | "broccoli-plugin": "^4.0.0", 16 | "ember-cli": "~3.16.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/npm-based-blocks/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # [1.2.0](https://github.com/linkedin/css-blocks/compare/v1.1.2...v1.2.0) (2020-08-05) 7 | 8 | 9 | ### Bug Fixes 10 | 11 | * Instead of addon use a vanilla module for testing node integration. ([9aafacd](https://github.com/linkedin/css-blocks/commit/9aafacd4dd20f87db2c2bb522f87adb1b4496e09)) 12 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/npm-based-blocks/blocks/bold.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-weight: bold; 3 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/npm-based-blocks/blocks/enableable-component.block.css: -------------------------------------------------------------------------------- 1 | @block bold from "./bold.block.css"; 2 | 3 | :scope { 4 | extends: bold; 5 | --addon-component-block-scope: applied; 6 | color: red; 7 | } 8 | 9 | .sub-class { 10 | --addon-component-block-class: applied; 11 | color: orange; 12 | } 13 | 14 | :scope[enabled] { 15 | --addon-component-block-scope-state: applied; 16 | color: green; 17 | } 18 | 19 | .sub-class[enabled] { 20 | --addon-component-block-class-state: applied; 21 | color: blue; 22 | } -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/npm-based-blocks/blocks/index.block.css: -------------------------------------------------------------------------------- 1 | @export (default as bold) from "./bold.block.css"; 2 | @export (default as enableable-component) from "./enableable-component.block.css"; 3 | 4 | -------------------------------------------------------------------------------- /private-packages/fixtures-ember-v2/npm-based-blocks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@css-blocks-fixtures-v2/npm-based-blocks", 4 | "version": "1.2.0", 5 | "css-blocks": { 6 | "main": "blocks/index.block.css" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/README.md: -------------------------------------------------------------------------------- 1 | This is a simple ember addon that contains templates and stylesheets that use 2 | CSS Blocks. This addon is consumed by [an ember application](../ember-app) 3 | for testing. -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-addon/addon/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/addon/components/addon-component.js: -------------------------------------------------------------------------------- 1 | import Component from '@ember/component'; 2 | import layout from '../templates/components/addon-component'; 3 | 4 | export default Component.extend({ 5 | layout, 6 | enabled: false, 7 | 8 | actions: { 9 | toggleEnabled() { 10 | this.toggleProperty("enabled"); 11 | } 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/addon/styles/components/addon-component.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | --addon-component-block-scope: applied; 3 | color: red; 4 | } 5 | 6 | .sub-class { 7 | --addon-component-block-class: applied; 8 | color: orange; 9 | } 10 | 11 | :scope[enabled] { 12 | --addon-component-block-scope-state: applied; 13 | color: green; 14 | } 15 | 16 | .sub-class[enabled] { 17 | --addon-component-block-class-state: applied; 18 | color: blue; 19 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/addon/templates/components/addon-component.hbs: -------------------------------------------------------------------------------- 1 |
    2 | Addon Component Scope Styles State: {{enabled}} 3 |
    4 | Addon Component Sub-class Styles State: {{enabled}} 5 |
    6 | 7 |
    -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-addon/app/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/app/components/addon-component.js: -------------------------------------------------------------------------------- 1 | export { default } from '@css-blocks-fixtures/ember-addon/components/addon-component'; -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | name: require("./package.json").name, 6 | 7 | isDevelopingAddon() { 8 | return true; 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-addon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@css-blocks-fixtures/ember-addon", 4 | "version": "1.5.0", 5 | "description": "simple addon that uses css-blocks.", 6 | "keywords": [ 7 | "ember-addon" 8 | ], 9 | "repository": "", 10 | "license": "BSD-2-Clause", 11 | "author": "", 12 | "dependencies": { 13 | "@css-blocks/ember-cli": "^1.5.0", 14 | "ember-cli-babel": "^7.17.2", 15 | "ember-cli-htmlbars": "^4.2.2" 16 | }, 17 | "devDependencies": { 18 | "ember-cli": "~3.16.0" 19 | }, 20 | "ember": { 21 | "edition": "octane" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | }, 6 | { 7 | "path": "/Users/ceppstei/Projects/css-blocks/packages/@css-blocks/ember-cli" 8 | } 9 | ], 10 | "settings": {} 11 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/README.md: -------------------------------------------------------------------------------- 1 | This ember application is used to test CSS Blocks' [ember-cli 2 | integration](../../../packages/@css-blocks/ember-cli). 3 | 4 | This is a full application that you can interact with by running `yarn 5 | start`. 6 | 7 | You can run the integration tests to ensure things are working correctly by 8 | running `yarn test`. These tests are ran in CI as well. -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/app/components/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/components/app-component.js: -------------------------------------------------------------------------------- 1 | import Component from '@ember/component'; 2 | import layout from '../templates/components/app-component'; 3 | 4 | export default Component.extend({ 5 | layout, 6 | enabled: false, 7 | 8 | actions: { 9 | toggleEnabled() { 10 | this.toggleProperty("enabled"); 11 | } 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/app/controllers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/controllers/compositions.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | enabled: false, 5 | color: 'unset', 6 | 7 | actions: { 8 | toggleEnabled() { 9 | this.toggleProperty("enabled"); 10 | }, 11 | toggleColor() { 12 | this.set('color', this.get('color') === 'unset' ? 'yellow' : 'unset'); 13 | } 14 | } 15 | }); -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/controllers/node-modules-resolution.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | enabled: false, 5 | 6 | actions: { 7 | toggleEnabled() { 8 | this.toggleProperty("enabled"); 9 | } 10 | } 11 | }); -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/controllers/route-block.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | 3 | export default Controller.extend({ 4 | enabled: false, 5 | 6 | actions: { 7 | toggleEnabled() { 8 | this.toggleProperty("enabled"); 9 | } 10 | } 11 | }); -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/app/helpers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/initializers/main.js: -------------------------------------------------------------------------------- 1 | import { registerDeprecationHandler } from '@ember/debug'; 2 | 3 | const DEPRECATIONS_TO_SILENCE = { 4 | 'ember-views.curly-components.jquery-element': true, 5 | }; 6 | 7 | function shouldSilenceDeprecationById(deprecationId = '') { 8 | return DEPRECATIONS_TO_SILENCE[deprecationId]; 9 | } 10 | 11 | export function initialize() { 12 | registerDeprecationHandler((message, options, next) => { 13 | if (options && shouldSilenceDeprecationById(options.id)) { 14 | return; 15 | } else { 16 | next(message, options); 17 | } 18 | }); 19 | } 20 | 21 | export default { initialize }; -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/app/models/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/app/routes/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/addon-component.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/app-component.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/compositions.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/ember-builtins.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/global-styles.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/node-modules-resolution.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/routes/route-block.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: sans-serif; 4 | } 5 | 6 | #reset-stylesheet-selector { 7 | --reset-stylesheet-selector: applied; 8 | color: rgb(102, 51, 153); 9 | } 10 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/components/app-component.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | --app-component-block-scope: applied; 3 | color: red; 4 | } 5 | 6 | .sub-class { 7 | --app-component-block-class: applied; 8 | color: orange; 9 | } 10 | 11 | :scope[enabled] { 12 | --app-component-block-scope-state: applied; 13 | color: green; 14 | } 15 | 16 | .sub-class[enabled] { 17 | --app-component-block-class-state: applied; 18 | color: blue; 19 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/ember-builtins.block.css: -------------------------------------------------------------------------------- 1 | .link-to-helper { 2 | --link-to-helper: applied; 3 | color: red; 4 | } 5 | 6 | .link-to-helper[active] { 7 | --link-to-helper-active: applied; 8 | color: green; 9 | } 10 | 11 | .input-helper { 12 | --input-helper: applied; 13 | } 14 | 15 | .textarea-helper { 16 | --textarea-helper: applied; 17 | } 18 | 19 | .select-helper { 20 | --select-helper: applied; 21 | } 22 | 23 | .button-helper { 24 | --button-helper: applied; 25 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/inherited-compositions.block.css: -------------------------------------------------------------------------------- 1 | @block util from "./utility.block.css"; 2 | 3 | .red { 4 | composes: "util.bold"; 5 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/node-modules-resolution.block.css: -------------------------------------------------------------------------------- 1 | /* @block-reference other from "in-repo-engine/styles/components/addon-component.block.css"; */ 2 | 3 | :scope { 4 | /* extends: other; */ 5 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/route-block.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | --route-block-scope: applied; 3 | color: red; 4 | } 5 | 6 | .sub-class { 7 | --route-block-class: applied; 8 | color: orange; 9 | } 10 | 11 | :scope[enabled] { 12 | --route-block-scope-state: applied; 13 | color: green; 14 | } 15 | 16 | .sub-class[enabled] { 17 | --route-block-class-state: applied; 18 | color: blue; 19 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/styles/utility.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | font-style: italic; 3 | } 4 | 5 | :scope[pink] { 6 | color: pink; 7 | } 8 | 9 | :scope[purple] { 10 | color: purple; 11 | } 12 | 13 | .red { 14 | color: red; 15 | } 16 | 17 | .green { 18 | color: green; 19 | } 20 | 21 | .orange { 22 | color: orange; 23 | } 24 | 25 | :scope[blue] { 26 | color: blue; 27 | } 28 | 29 | :scope[yellow] { 30 | color: yellow; 31 | } 32 | 33 | .brown { 34 | color: brown; 35 | } 36 | 37 | .bold { 38 | font-weight: bold; 39 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/addon-component.hbs: -------------------------------------------------------------------------------- 1 | {{addon-component}} -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/app-component.hbs: -------------------------------------------------------------------------------- 1 | {{app-component}} 2 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/app/templates/components/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/components/app-component.hbs: -------------------------------------------------------------------------------- 1 |
    2 | App Component Scope Styles State: {{enabled}} 3 |
    4 | App Component Sub-class Styles State: {{enabled}} 5 |
    6 | 7 |
    -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/ember-builtins.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{#link-to "index" block:class="link-to-helper" id="link-to-helper"}}Inactive Link To Helper{{/link-to}} 3 | {{#link-to "ember-builtins" block:class="link-to-helper" id="link-to-helper-active"}}Active Link To Helper{{/link-to}} 4 |
    -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/global-styles.hbs: -------------------------------------------------------------------------------- 1 |
    Global app.css styles makes me purple
    -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/node-modules-resolution.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{!--
    3 | Node Module Resolution Scope Styles State: {{enabled}} 4 |
    5 | Node Module Resolution Sub-Class Styles State: {{enabled}} 6 |
    7 | 8 |
    --}} -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/app/templates/route-block.hbs: -------------------------------------------------------------------------------- 1 |
    2 | Route Scope Styles State: {{enabled}} 3 |
    4 | Route Sub-class Styles State: {{enabled}} 5 |
    6 | 7 |
    -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "jquery-integration": true 3 | } 4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/testem.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | test_page: 'tests/index.html?hidepassed&nolint', 3 | disable_watching: true, 4 | // only emit logs for failed tests 5 | // https://github.com/testem/testem#tap-options 6 | tap_quiet_logs: true, 7 | launch_in_ci: [ 8 | 'Chrome' 9 | ], 10 | launch_in_dev: [ 11 | 'Chrome' 12 | ], 13 | browser_args: { 14 | Chrome: [ 15 | '--disable-gpu', 16 | '--headless', 17 | '--remote-debugging-port=9222', 18 | '--window-size=1440,900' 19 | ] 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/tests/helpers/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/tests/integration/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/tests/integration/helpers/-css-blocks-concat-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('-css-blocks-concat', 'Helper | -css-blocks-concat', { 5 | integration: true 6 | }); 7 | 8 | test('it concats input', function(assert) { 9 | this.set('inputValue', '1234'); 10 | 11 | this.render(hbs`{{-css-blocks-concat inputValue "foo"}}`); 12 | 13 | assert.equal(this.$().text().trim(), '1234foo'); 14 | }); 15 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/tests/unit/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-app/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/private-packages/fixtures/ember-app/vendor/.gitkeep -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/README.md: -------------------------------------------------------------------------------- 1 | This is a simple ember engine that contains templates and stylesheets that 2 | use CSS Blocks. This engine is consumed by [an ember 3 | application](../ember-app) for testing. -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/addon/engine.js: -------------------------------------------------------------------------------- 1 | import Engine from 'ember-engines/engine'; 2 | import loadInitializers from 'ember-load-initializers'; 3 | import Resolver from './resolver'; 4 | import config from './config/environment'; 5 | 6 | const { modulePrefix } = config; 7 | 8 | const Eng = Engine.extend({ 9 | modulePrefix, 10 | Resolver 11 | }); 12 | 13 | loadInitializers(Eng, modulePrefix); 14 | 15 | export default Eng; 16 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/addon/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/addon/routes.js: -------------------------------------------------------------------------------- 1 | import buildRoutes from 'ember-engines/routes'; 2 | 3 | export default buildRoutes(function() { 4 | // Define your engine's route map here 5 | }); 6 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/addon/styles/application.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: pink; 3 | --in-repo-eager-engine-scope: applied; 4 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/addon/templates/application.hbs: -------------------------------------------------------------------------------- 1 |
    2 | IN THE ENGINE! 3 | {{#addon-component}}{{/addon-component}} 4 |
    5 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(environment) { 5 | let ENV = { 6 | modulePrefix: '@css-blocks-fixtures/ember-engine', 7 | environment 8 | }; 9 | 10 | return ENV; 11 | }; 12 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | const EngineAddon = require('ember-engines/lib/engine-addon'); 5 | 6 | module.exports = EngineAddon.extend({ 7 | name: require("./package.json").name, 8 | 9 | lazyLoading: { 10 | enabled: false 11 | }, 12 | 13 | isDevelopingAddon() { 14 | return true; 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-engine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "version": "1.5.0", 4 | "name": "@css-blocks-fixtures/ember-engine", 5 | "keywords": [ 6 | "ember-addon", 7 | "ember-engine" 8 | ], 9 | "dependencies": { 10 | "@css-blocks-fixtures/ember-addon": "^1.5.0", 11 | "@css-blocks/ember-cli": "^1.5.0", 12 | "ember-cli-babel": "^7.7.3", 13 | "ember-cli-htmlbars": "^4.2.3" 14 | }, 15 | "devDependencies": { 16 | "ember-cli": "~3.16.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/README.md: -------------------------------------------------------------------------------- 1 | This is a simple lazy ember engine that contains templates and stylesheets 2 | that use CSS Blocks. This engine is consumed by [an ember 3 | application](../ember-app) for testing. -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/addon/engine.js: -------------------------------------------------------------------------------- 1 | import Engine from 'ember-engines/engine'; 2 | import loadInitializers from 'ember-load-initializers'; 3 | import Resolver from './resolver'; 4 | import config from './config/environment'; 5 | 6 | const { modulePrefix } = config; 7 | 8 | const Eng = Engine.extend({ 9 | modulePrefix, 10 | Resolver 11 | }); 12 | 13 | loadInitializers(Eng, modulePrefix); 14 | 15 | export default Eng; 16 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/addon/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/addon/routes.js: -------------------------------------------------------------------------------- 1 | import buildRoutes from 'ember-engines/routes'; 2 | 3 | export default buildRoutes(function() { 4 | // Define your engine's route map here 5 | }); 6 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/addon/styles/application.block.css: -------------------------------------------------------------------------------- 1 | :scope { 2 | color: yellowgreen; 3 | --in-repo-lazy-engine-scope: applied; 4 | } -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/addon/templates/application.hbs: -------------------------------------------------------------------------------- 1 |
    2 | IN THE LAZY ENGINE! 3 |
    4 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(environment) { 5 | let ENV = { 6 | modulePrefix: '@css-blocks-fixtures/ember-lazy-engine', 7 | environment 8 | }; 9 | 10 | return ENV; 11 | }; 12 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | const EngineAddon = require('ember-engines/lib/engine-addon'); 5 | 6 | module.exports = EngineAddon.extend({ 7 | name: require("./package.json").name, 8 | 9 | lazyLoading: { 10 | enabled: true 11 | }, 12 | 13 | isDevelopingAddon() { 14 | return true; 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /private-packages/fixtures/ember-lazy-engine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "version": "1.5.0", 4 | "name": "@css-blocks-fixtures/ember-lazy-engine", 5 | "keywords": [ 6 | "ember-addon", 7 | "ember-engine" 8 | ], 9 | "dependencies": { 10 | "@css-blocks/ember-cli": "^1.5.0", 11 | "ember-cli-babel": "^7.7.3", 12 | "ember-cli-htmlbars": "^4.2.3" 13 | }, 14 | "devDependencies": { 15 | "ember-cli": "~3.16.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /rfcs/ember-cli-blocks-v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/css-blocks/c443fc0717d5f9e599e19ca388a3b9ec890d6e2f/rfcs/ember-cli-blocks-v2.png -------------------------------------------------------------------------------- /scripts/checkout-opticss-and-link.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | OPTICSS_DIR=$1 4 | if [[ -z "$OPTICSS_DIR" ]]; 5 | then 6 | OPTICSS_DIR=../opticss 7 | fi 8 | ./scripts/if-opticss-dev.sh ./scripts/checkout-opticss.sh $OPTICSS_DIR 9 | ./scripts/if-opticss-dev.sh ./scripts/link-to-opticss.js $OPTICSS_DIR 10 | -------------------------------------------------------------------------------- /scripts/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "opticss": { 3 | "branch": "master", 4 | "release": "latest" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/if-opticss-dev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | RELEASE="$(node -e "const j = require('./scripts/config.json'); process.stdout.write(j.opticss.release);")"; 3 | if [ "$RELEASE" == "latest" ]; then 4 | echo "Currently running against the latest release of opticss. Skipping $@"; 5 | exit 0; 6 | else 7 | $@ 8 | fi 9 | -------------------------------------------------------------------------------- /typedoc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "src": [ 3 | "./packages/@css-blocks/broccoli/src", 4 | "./packages/@css-blocks/core/src", 5 | "./packages/@css-blocks/glimmer/src", 6 | "./packages/@css-blocks/jsx/src", 7 | "./packages/@css-blocks/runtime/src", 8 | "./packages/@css-blocks/webpack/src" 9 | ], 10 | "out": "packages/@css-blocks/website/public/api", 11 | "mode": "modules", 12 | "theme": "packages/@css-blocks/website/typedoc-theme", 13 | "name": "@css-blocks", 14 | "external-modulemap": ".*packages\/(@css-blocks\/[^\/]+)\/.*", 15 | "readme": "./README.md", 16 | "gaID": "UA-118435129-1" 17 | } 18 | -------------------------------------------------------------------------------- /types-local/inline-source-map-comment/index.d.ts: -------------------------------------------------------------------------------- 1 | export = inline_source_map_comment; 2 | 3 | declare interface Options { 4 | block: boolean, 5 | sourcesContent: boolean, 6 | } 7 | 8 | declare function inline_source_map_comment(map: any, options: Partial, ...args: any[]): any; 9 | 10 | declare namespace inline_source_map_comment { 11 | const prefix: string; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /types-local/inline-source-map-comment/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {}, 3 | "description": "TypeScript definitions for inline-source-map-comment 1.0.5", 4 | "name": "@types/inline-source-map-comment", 5 | "typings": "index.d.ts", 6 | "version": "1.0.5" 7 | } -------------------------------------------------------------------------------- /types-local/loader-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {}, 3 | "description": "TypeScript definitions for loader-utils 1.1.0", 4 | "name": "@types/loader-utils", 5 | "typings": "index.d.ts", 6 | "version": "1.1.0" 7 | } -------------------------------------------------------------------------------- /types-local/perfectionist/index.d.ts: -------------------------------------------------------------------------------- 1 | export = perfectionist; 2 | 3 | declare function perfectionist(...args: any[]): any; 4 | 5 | declare namespace perfectionist { 6 | function postcss(css: any): void; 7 | 8 | function process(css: any, ...args: any[]): any; 9 | 10 | namespace postcss { 11 | const postcssPlugin: string; 12 | 13 | const postcssVersion: string; 14 | 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /types-local/perfectionist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {}, 3 | "description": "TypeScript definitions for perfectionist 2.4.0", 4 | "name": "@types/perfectionist", 5 | "typings": "index.d.ts", 6 | "version": "2.4.0" 7 | } -------------------------------------------------------------------------------- /types-local/regexpu-core/index.d.ts: -------------------------------------------------------------------------------- 1 | export = regexpu_core; 2 | 3 | interface RegExpUOpts { 4 | unicodePropertyEscape: boolean; 5 | dotAllFlag: boolean; 6 | useUnicodeFlag: boolean; 7 | } 8 | /** 9 | * @param pattern the regular expression string 10 | * @param [flags] a string containing the letters i (ignore case), u (unicode), and s (dot matches newlines) 11 | * @returns a regular expression string that is suitable for passing to the JS RegExp constructor. 12 | **/ 13 | declare function regexpu_core(pattern: string, flags?: string, options?: Partial): string; 14 | -------------------------------------------------------------------------------- /types-local/regexpu-core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {}, 3 | "description": "TypeScript definitions for regexpu-core 4.0.11", 4 | "name": "@types/regexpu-core", 5 | "typings": "index.d.ts", 6 | "version": "4.0.11" 7 | } -------------------------------------------------------------------------------- /types-local/test-console/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "test-console" { 2 | export = testConsole; 3 | namespace testConsole { 4 | interface IgnoreOptions { 5 | isTTY?: boolean; 6 | } 7 | interface Output { 8 | inspect(): { 9 | output: Array; 10 | restore(): void; 11 | } 12 | inspectSync(cb: (output: Array) => any): Array; 13 | ignore(options: IgnoreOptions): () => void; 14 | ignoreSync(options: IgnoreOptions, cb: () => any): void; 15 | } 16 | const stdout: Output; 17 | const stderr: Output; 18 | } 19 | } -------------------------------------------------------------------------------- /types-local/test-console/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {}, 3 | "description": "TypeScript definitions for test-console 1.1.0", 4 | "name": "@types/test-console", 5 | "typings": "index.d.ts", 6 | "version": "1.1.0" 7 | } --------------------------------------------------------------------------------