10.7.0 • Published 1 month ago

@carbon/import-once v10.7.0

Weekly downloads
48,691
License
Apache-2.0
Repository
github
Last release
1 month ago

@carbon/import-once

Sass helper for importing files only once. Used in the Carbon Design System

Getting started

To install @carbon/import-once in your project, you will need to run the following command using npm:

npm install -S @carbon/import-once

If you prefer Yarn, use the following command instead:

yarn add @carbon/import-once

Usage

@carbon/import-once is helpful when needing to guarantee that a module is loaded only once. It does this by exporting a exports mixin that you can use.

This mixin is particularly useful when you have a situation where your work might share common dependencies that you don't want duplicated. For example, imagine we had modules a.scss and b.scss that both import c.scss. Using the exports mixin from @carbon/import-once will guarantee that c.scss is loaded only once.

This looks like:

// a.scss
@import 'c';

// b.scss
@import 'c';

// c.scss
@import '@carbon/import-once/scss/import-once';

@include exports('c') {
  // ...
}

🙌 Contributing

We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide! 👀

📝 License

Licensed under the Apache 2.0 License.

10.7.1

1 month ago

10.7.0

2 years ago

10.7.0-rc.0

2 years ago

10.6.0

3 years ago

10.5.0

3 years ago

10.5.0-rc.0

3 years ago

10.5.0-alpha.0

3 years ago

10.4.0

3 years ago

10.4.0-rc.0

3 years ago

10.4.0-alpha.0

4 years ago

10.3.0

5 years ago

10.3.0-rc.3

5 years ago

10.3.0-rc.2

5 years ago

10.3.0-rc.1

5 years ago

10.3.0-rc.0

5 years ago

10.2.0

5 years ago

10.1.0

5 years ago

10.0.0

5 years ago

10.0.0-rc.0

5 years ago

0.0.1-beta.5

5 years ago

0.0.1-beta.4

5 years ago

0.0.1-beta.3

5 years ago

0.0.1-beta.2

5 years ago

0.0.1-beta.1

5 years ago

0.0.1-beta.0

5 years ago

0.0.1-alpha.32

5 years ago

0.0.1-alpha.31

5 years ago

0.0.1-alpha.30

5 years ago

0.0.1-alpha.29

5 years ago

0.0.1-alpha.28

5 years ago

0.0.1-alpha.27

5 years ago

0.0.1-alpha.26

5 years ago

0.0.1-alpha.25

5 years ago

0.0.1-alpha.24

5 years ago

0.0.1-alpha.23

5 years ago

0.0.1-alpha.22

5 years ago

0.0.1-alpha.21

5 years ago

0.0.1-alpha.20

5 years ago

0.0.1-alpha.19

5 years ago

0.0.1-alpha.18

5 years ago

0.0.1-alpha.17

5 years ago

0.0.1-alpha.16

5 years ago

0.0.1-alpha.15

5 years ago

0.0.1-alpha.14

5 years ago

0.0.1-alpha.13

5 years ago

0.0.1-alpha.12

5 years ago

0.0.1-alpha.11

5 years ago

0.0.1-alpha.10

5 years ago

0.0.1-alpha.9

5 years ago

0.0.1-alpha.8

5 years ago

0.0.1-alpha.7

5 years ago

0.0.1-alpha.6

5 years ago

0.0.1-alpha.5

5 years ago

0.0.1-alpha.4

5 years ago

0.0.1-alpha.3

5 years ago