Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixes vscode CSS Conversion + refactor #46

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
25 changes: 25 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint
on:
push:
branches: ['master', 'main']
pull_request:
types: [opened, synchronize]

jobs:
lint:
name: Run typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7

- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Run tsc
run: pnpm lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ dist
*.log
yarn.lock
package-lock.json
.turbo

tsconfig.tsbuildinfo
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 Ansuman Shah
Copyright (c) 2023 Valerii Smirnov

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
68 changes: 18 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
# Autocomplete for React Native and css-in-js for Atom and VS Code
# Autocomplete for React Native and css-in-js for VS Code

[![Star on GitHub][github-star-badge]][github-star][![Tweet][twitter-badge]][twitter]
[![Star on GitHub][github-star-badge]][github-star] [![Tweet][twitter-badge]][twitter]
[![PRs Welcome][prs-badge]][prs]
[![Version][version-badge]][package]
[![MIT License][license-badge]][LICENSE]
[package]

Now get Autocomplete for CSSinJS libraries using object styles.
<a href="https://app.codesponsor.io/link/jZ7oK2ZsGezatDv9YZW6fM3e/ansumanshah/css-in-js" rel="nofollow"><img src="https://app.codesponsor.io/embed/jZ7oK2ZsGezatDv9YZW6fM3e/ansumanshah/css-in-js.svg" style="width: 888px; height: 68px;" alt="Sponsor" /></a>
Now get Autocomplete for CSS in JS libraries using object styles.

## Installation
```
apm install css-in-js
```
Or go to Settings → Install and search for `css-in-js`
This is basically a fork of [css-in-js](https://github.com/ansumanshah/css-in-js)

## Usage
```js
const btnA = css({ /* styles */ });
const btnB = glamorous.div({ /* styles */ });
const btnC = StyleSheet.create({ /* styles */ });
```
Only works for these keywords by default you can edit in settings for more.

`glamorous | css | StyleSheet.create`

![ReactNative][native-demo]

![Autocomplete][autocomplete-demo]

Does not work for general objects
```js
let styles = {
/* styles */
}
```
This is basically a fork of [autocomplete-css](https://github.com/atom/autocomplete-css)

## [CSS in JS for VS Code](https://marketplace.visualstudio.com/items?itemName=paulmolluzzo.convert-css-in-js)
## [CSS in JS for VS Code](https://marketplace.visualstudio.com/items?itemName=XantreGodlike.convert-css-in-js-reborn)

> Provides CSS in JS autocompletion and converts kebab-case CSS to camelCase CSS and vice versa

* Provides autocompletion options for CSS styles as a style object for use in CSS in JS (like [`glamorous`](https://github.com/paypal/glamorous/)!)
* Converts CSS between regular CSS syntax (strings) and CSS-in-JS syntax (style objects)
- Provides autocompletion options for CSS styles as a style object for use in CSS in JS (like [`glamorous`](https://github.com/paypal/glamorous/)!)
- Converts CSS between regular CSS syntax (strings) and CSS-in-JS syntax (style objects)

### Autocomplete

![autocomplete](https://user-images.githubusercontent.com/737065/30726961-1fbd6794-9f1c-11e7-828b-fc6793b238bc.gif)

### Convert CSS in JS

![demo](https://user-images.githubusercontent.com/737065/28219279-6ffbf4c4-6889-11e7-8d3d-51637fe90856.gif)

### How to Use CSS Conversion
Expand All @@ -59,20 +33,14 @@ Or use the keyboard shortcut `cmd+shift+j` (`ctrl+shift+j` on Windows).

Coming Soon

*Codemods for easy shifting between css-in-js libraries*

[autocomplete-demo]: https://raw.githubusercontent.com/ansumanshah/css-in-js/master/packages/atom-css-in-js/cssinjs.gif
[native-demo]: https://raw.githubusercontent.com/ansumanshah/css-in-js/master/packages/atom-css-in-js/native.gif
[converter-demo]: https://raw.githubusercontent.com/ansumanshah/css-in-js/master/packages/atom-css-in-js/example.gif

[github-star-badge]: https://img.shields.io/github/stars/ansumanshah/css-in-js.svg?style=social
[github-star]: https://github.com/ansumanshah/css-in-js/stargazers
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20Atom%20Autocomplete%20css-in-js!%20https://github.com/ansumanshah/css-in-js%20%F0%9F%91%8D
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/ansumanshah/css-in-js.svg?style=social
_Codemods for easy shifting between css-in-js libraries_

[version-badge]: https://img.shields.io/apm/v/css-in-js.svg?style=flat-square
[package]: https://atom.io/packages/css-in-js
[license-badge]: https://img.shields.io/apm/l/css-in-js.svg?style=flat-square
[license]: https://github.com/ansumanshah/css-in-js/blob/master/LICENSE
[autocomplete-demo]: https://raw.githubusercontent.com/XantreGodlike/css-in-js/master/packages/atom-css-in-js/cssinjs.gif
[native-demo]: https://raw.githubusercontent.com/XantreGodlike/css-in-js/master/packages/atom-css-in-js/native.gif
[converter-demo]: https://raw.githubusercontent.com/XantreGodlike/css-in-js/master/packages/atom-css-in-js/example.gif
[github-star-badge]: https://img.shields.io/github/stars/XantreGodlike/css-in-js.svg?style=social
[github-star]: https://github.com/XantreGodlike/css-in-js/stargazers
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20Atom%20Autocomplete%20css-in-js!%20https://github.com/XantreGodlike/css-in-js%20%F0%9F%91%8D
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/XantreGodlike/css-in-js.svg?style=social
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs]: http://makeapullrequest.com
7 changes: 0 additions & 7 deletions lerna.json

This file was deleted.

33 changes: 12 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
{
"private": true,
"scripts": {
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'",
"precommit": "lint-staged"
},
"private": true,
"scripts": {
"format": "prettier --ignore-unknown --write",
"lint": "turbo lint"
},
"devDependencies": {
"husky": "^0.14.3",
"lerna": "^2.1.2",
"lint-staged": "^4.1.0",
"prettier": "^1.6.1"
"@changesets/cli": "^2.26.1",
"prettier": "^2.8.4",
"turbo": "^1.8.8",
"typescript": "^5.0.2"
},
"author": "Ansuman Shah",
"homepage": "https://github.com/ansumanshah/css-in-js#readme",
"author": "XantreGodlike",
"homepage": "https://github.com/XantreGodlike/css-in-js#readme",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ansumanshah/css-in-js.git"
},
"lint-staged": {
"*.js": [
"prettier --trailing-comma es5 --no-semi --single-quote --write",
"git add"
],
"yarn.lock": [
"git rm --cached"
]
"url": "git+https://github.com/XantreGodlike/css-in-js.git"
}
}
2 changes: 0 additions & 2 deletions packages/atom-css-in-js/CHANGELOG.md

This file was deleted.

61 changes: 0 additions & 61 deletions packages/atom-css-in-js/README.md

This file was deleted.

Loading