Skip to content

Commit 8693648

Browse files
authored
Merge pull request #11 from styled-components/update-readme
Update readme with features and contribution instructions
2 parents 01cd0d1 + db57f2b commit 8693648

File tree

2 files changed

+53
-13
lines changed

2 files changed

+53
-13
lines changed

README.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,60 @@
11
# webstorm-styled-components
2-
React Styled Components Language Support in IntelliJ/Webstorm
2+
Support for styled-components 💅 in WebStorm
33

4-
# Motivation
5-
https://github.com/styled-components/styled-components/issues/176
4+
The plugin can be installed in WebStorm, IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine v2017.2 and above.
65

76
# Installation
8-
An alpha version is here! Here are the steps you need for installations
9-
- Download the latest release from here https://github.com/styled-components/webstorm-styled-components/releases/
10-
- Extract the archive
11-
- In Webstorm, Hit <kbd>CMD</kbd>+<kbd>SHIFT</kbd>+<kbd>A</kbd> to bring up actions pane. Then select *Add Plugin From Disk*
7+
To install the plugin:
8+
- Download the latest [release](https://github.com/styled-components/webstorm-styled-components/releases/)
9+
- In WebStorm, hit <kbd>Cmd</kbd>/<kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>A</kbd> to bring up the actions pane. Then select *Add Plugin From Disk*
1210
- Select `webstorm-styled-components.zip` to install the plugin
13-
- You should find your StyledComponents instances highlighted automatically
1411

15-
# Known Issues
16-
The plugin only works with Webstorm 2017
12+
# Features
13+
With this plugin you can enjoy the full coding assistance for styled-components 💅
1714

18-
# Current Progress
19-
![alt text](https://d26dzxoao6i3hh.cloudfront.net/items/1Z0q2R2Y3F0b0H091436/Image%202017-08-30%20at%204.23.48%20PM.png?v=589202df)
15+
- Start typing to get code completion for CSS properties and values
2016

21-
# TODO
17+
<img src="https://blog.jetbrains.com/webstorm/files/2017/09/ws-st-comp-css-completion.png" width=680>
18+
19+
- Hit <kbd>Alt</kbd>-<kbd>Enter</kbd> to see available intentions and quick-fixes
20+
21+
<img src="https://blog.jetbrains.com/webstorm/files/2017/09/ws-st-comp-intentions.png" width=680>
22+
23+
- Start typing in the interpolation to see completion suggestions for JavaScript variables, methods and functions
24+
25+
<img src="https://blog.jetbrains.com/webstorm/files/2017/09/ws-st-comp-js-completion.png" width=680>
26+
27+
- Cmd/Ctrl-click on the JavaScript symbol to do to its definition
28+
29+
# Limitations
30+
- The plugin only works with the JetBrains IDEs version 2017.2 or above.
31+
- It is not yet available on [JetBrains Plugin Repository](https://plugins.jetbrains.com/). When installing the plugin from disk, you won't get update notifications for it.
32+
- Semicolons at the end on the line should be outside the string, e.g. `color: ${props => props.primary ? 'white' : 'palevioletred'};`
33+
34+
# Contributing to the plugin
35+
Please report any issue with the plugin on [GitHub](https://github.com/styled-components/webstorm-styled-components/issues). We welcome your pull requests.
36+
37+
The plugin is written in [Kotlin](https://kotlinlang.org/) and uses [Gradle](https://gradle.org/).
38+
39+
**To start contributing**
40+
1. Clone this repository.
41+
2. Open the resulting directory in a recent version of Intellij IDEA (2017.*) using 'Open project'.
42+
3. In the 'Import Project from Gradle' dialog, accept the default settings.
43+
44+
* To **run tests** use `test` task (from the IDEA UI search for 'Execute Gradle Task' and select `test` or run `./gradlew test` from the command line)
45+
46+
* To **launch IDEA** with the plugin built from your current sources use `runIde`
47+
48+
* To **prepare a zip archive** for deployment use `buildPlugin`
49+
50+
The project structure and dependencies are defined in [build.gradle](https://github.com/styled-components/webstorm-styled-components/blob/master/build.gradle).
51+
52+
**Useful links**
53+
* [gradle-intellij-plugin](https://github.com/JetBrains/gradle-intellij-plugin) documentation on available Gradle tasks and build.gradle configuration options
54+
* [IDEA SDK documentation](https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started.html) describes IDEA plugin structure in general
55+
* [Kotlin language reference](https://kotlinlang.org/docs/reference/)
56+
57+
# Todo
2258
- Smart Indentation when opening backticks and pressing enter.
2359

2460
# License (MIT)

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ repositories {
88
}
99

1010
intellij {
11+
//defines the version of IDEA distribution that should be used as a dependency
1112
version 'IU-2017.2'
13+
// plugins to be used as build dependencies
1214
plugins = ['JavaScriptLanguage', 'CSS', 'less']
15+
//name is used for zip archive when building plugin
1316
pluginName 'webstorm-styled-components'
1417
downloadSources false
1518
}
1619

1720
sourceSets {
21+
//mark directory as test sources
1822
test {
1923
java.srcDir 'src/test'
2024
}

0 commit comments

Comments
 (0)