Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Cannot get any editor.css to load #85515
    smlombardi
    Participant

    FWIW, I used the smaller repo… for the other there would be a lot fo stuff to remove.

    You might want to have a very stripped-down one as a “stub” project with just a simple static or richtext block in it.

    At work, we have an Angular “Starter app” which users can download and then get a single “hello world” page.

    in reply to: Libraries in Package.json way out of date #85505
    smlombardi
    Participant
    bash-3.2$ npm outdated
    Package                          Current   Wanted  Latest  Location
    @wordpress/babel-preset-default    1.3.0    1.3.0   3.0.2  pbds-blocks
    babel-eslint                       8.2.6    8.2.6  10.0.1  pbds-blocks
    babel-loader                       7.1.5    7.1.5   8.0.5  pbds-blocks
    css-loader                       0.28.11  0.28.11   2.1.0  pbds-blocks
    eslint                            4.19.1   4.19.1  5.12.1  pbds-blocks
    postcss-loader                     2.1.6    2.1.6   3.0.0  pbds-blocks
    raw-loader                         0.5.1    0.5.1   1.0.0  pbds-blocks
    sass-loader                        6.0.7    6.0.7   7.1.0  pbds-blocks
    style-loader                      0.19.1   0.19.1  0.23.1  pbds-blocks
    webpack                           3.12.0   3.12.0  4.29.0  pbds-blocks
    

    It does work fine, it’s just outdated and doesn’t work if you do indeed update everything to its latest.

    in reply to: Cannot get any editor.css to load #85503
    smlombardi
    Participant

    What did you change (so that I can change my project to match — I already made 3 or 4 blocks in it)

    Looks like you change this function to remove the wp-blocks in the brackets, line 71.

    
        // Enqueue optional editor only styles
        wp_enqueue_style(
            'jsforwphowto-blocks-editor-css',
            plugins_url( $editorStylePath, __FILE__),
            [],
            filemtime( plugin_dir_path( __FILE__ ) . $editorStylePath )
        );
    

    Works now, thanks!

    in reply to: Cannot get any editor.css to load #85480
    smlombardi
    Participant

    To elaborate further:

    * I have added a file editor.scss to my block directory.

    * I import it into index.js

    * I see that the css is compiled and added to /assets/css/blocks.editor.css

    * The stying is NOT applied to the back end

    BUT

    If I apply the same code, to styles.scss in the block folder it works (of course, on both back and front end — which I don’t want)

    What’s up?

    in reply to: Libraries in Package.json way out of date #85289
    smlombardi
    Participant
Viewing 5 posts - 1 through 5 (of 5 total)