Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

Release/v3.0.2 #39

Merged
merged 18 commits into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ message.
|:---------|:----------------------------------------------------------|:------------------------------------------------------------------------------|
| `Add` | Implement functions/Add files/Support new platform | |
| `Change` | Change current spec | Use this type when breaking changes are happened, otherwise DO NOT use. |
| `Fix` | Fix bugs | Use this type when fix bugs, otherwise DO NOT use. |
| `Fix` | Fix bugs | Use this type when you fix bugs, otherwise DO NOT use. |
| `Modify` | Modify wording | Use this type when breaking changes are not happened and fix other than bugs. |
| `Clean` | Refactor some codes/Rename classes, methods, or variables | |
| `Remove` | Remove unneeded files or libraries | |
Expand All @@ -59,7 +59,7 @@ Add Implement sign up system
```

### `<SUMMARY>`
`<SUMMARY>` is a sumamry of changes, do not exceed 50 characters including a commit type. Do not include period `.` because
`<SUMMARY>` is a summary of changes, do not exceed 50 characters including a commit type. Do not include period `.` because
a summary should be expressed one sentence. Also start with upper case.

```bash
Expand Down
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: "💩 Bug Report"
about: "If something isn't working as expected..."
title: ""
labels: "Type: 4. Bug"
assignees: ""
---

# 💩 Bug Report
## A summary of the bug
A clear and concise description of what the bug is.


## Current behavior
A clear and concise description of the behavior.

### To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository.

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


## Expected behavior
A clear and concise description of what you expected to happen or code.


## Environment
- This project version(s): `vX.X.X`
- Nodejs version: `vX.X.X`
- OS: `macOS 10.X.X`
- Browser (if applies): `Google Chrome vX.X.X`


## Additional context
Add any other context about the problem here, or a screenshot if applicable.

---

- [ ] I've tried to find similar issues
- [ ] I would like to work on a fix 💪🏻
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: "🌱 Feature Request"
about: "Create a feature request for this project..."
title: ""
labels: "Type: 2. Enhancement"
assignees: ""
---

# 🌱 Feature Request
## Is your feature request related to a problem? Please describe.
A clear and concise description of what you want and what your use case is.


## Describe the solution you'd like
A clear and concise description of what you want to happen.


## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.


## Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and how it might be documented. Maybe a mock-up?


## Additional context
Add any other context or screenshots about the feature request here.

---

- [ ] I've tried to find similar issues and pull requests
- [ ] I would like to work on this feature 💪🏻
60 changes: 60 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Build and test"
on:
push:
branches: ["master"]
pull_request: {}
jobs:

parameters:
name: "Set parameters"
runs-on: "ubuntu-latest"
outputs:
GITHUB_SHA: "${{ steps.GITHUB_SHA.outputs.GITHUB_SHA }}"
steps:
- id: "GITHUB_SHA"
run: "echo \"::set-output name=GITHUB_SHA::$GITHUB_SHA\""

build:
name: "Build"
runs-on: "ubuntu-latest"
needs: "parameters"
strategy:
matrix:
node: ["10.15", "12.13"]
steps:
- uses: "actions/checkout@v2"
- name: "Use Node.js"
uses: "actions/setup-node@v1"
with:
node-version: "${{ matrix.node }}"
- name: "Cache dependencies"
id: "node-modules-dependencies"
uses: "actions/cache@v2"
with:
path: "./node_modules"
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
- name: "Install dependencies if needed"
if: "steps.node-modules-dependencies.outputs.cache-hit != 'true'"
run: "npm ci"

lint:
name: "Lint"
needs: ["parameters", "build"]
runs-on: "ubuntu-latest"
strategy:
matrix:
node: ["10.15", "12.13"]
steps:
- uses: "actions/checkout@v2"
- name: "Use Node.js"
uses: "actions/setup-node@v1"
with:
node-version: "${{ matrix.node }}"
- name: "Restore cached dependencies"
id: "node-modules-dependencies"
uses: "actions/cache@v2"
with:
path: "./node_modules"
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
- name: "Execute linters"
run: "npm run lint"
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Changelog
## 3.0.2 (2020-08-02)
- Add support for built-in CSS modules #38 - [@jagaapple](https://github.com/jagaapple) [@p-chan](https://github.com/p-chan)
- Add an example project with `@zeit/next-css` #37
- Update documents #36
- Update dependencies #34
- Improve development environment
- Migrate to GitHub Actions #35

## 3.0.1 (2019-12-19)
- Fix to load from CSS #26 #27 - [@jagaapple](https://github.com/jagaapple)
- Improve development environment
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default (props) => (

<div align="center">
<a href="https://www.npmjs.com/package/next-image-element"><img src="https://img.shields.io/npm/v/next-image-element.svg" alt="npm"></a>
<a href="https://circleci.com/gh/jagaapple/next-image-element"><img src="https://img.shields.io/circleci/project/github/jagaapple/next-image-element/master.svg" alt="CircleCI"></a>
<a href="https://github.com/jagaapple/next-image-element/actions"><img src="https://github.com/jagaapple/next-image-element/workflows/Build%20and%20test/badge.svg" alt="GitHub Actions"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/github/license/jagaapple/next-image-element.svg" alt="license"></a>
<a href="https://twitter.com/jagaapple_tech"><img src="https://img.shields.io/badge/contact-%40jagaapple_tech-blue.svg" alt="@jagaapple_tech"></a>
</div>
Expand Down Expand Up @@ -220,4 +220,4 @@ Please read [Contributing Guidelines](./.github/CONTRIBUTING.md) before developm
## License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Copyright 2019 Jaga Apple. All rights reserved.
Copyright 2020 Jaga Apple. All rights reserved.
25 changes: 25 additions & 0 deletions example-with-next-css/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
.env*

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 5 additions & 0 deletions example-with-next-css/@types/css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module "*.css" {
const styles: Record<string, string>;

export default styles;
}
8 changes: 8 additions & 0 deletions example-with-next-css/components/background-images.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import styles from "./background-images.css";

export const BackgroundImages = () => (
<div className={styles.wrapper}>
<div className={styles.star} />
<div className={styles.polygon} />
</div>
);
3 changes: 3 additions & 0 deletions example-with-next-css/images/polygon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example-with-next-css/images/star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions example-with-next-css/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
14 changes: 14 additions & 0 deletions example-with-next-css/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const withCSS = require("@zeit/next-css");
const withImageElement = require("next-image-element");

module.exports = withCSS(
withImageElement({
cssModules: true,
imageElementOptions: {
sizeLimit: 1024,
// publicPath: "/static/images",
// outputPath: 123,
outputFileNamePattern: "[hash].[ext]",
},
}),
);
Loading